Skip to content

Commit

Permalink
Update openai.test.w
Browse files Browse the repository at this point in the history
  • Loading branch information
eladb authored Mar 19, 2024
1 parent 3ca9023 commit d4fb8ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openai/openai.test.w
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ let key = new cloud.Secret(name: "my-openai-key");
let oai = new openai.OpenAI(apiKeySecret: key);

test "basic completion" {
let answer = oai.createCompletion("tell me a short joke", model: "gpt-3.5-turbo", max_tokens: 2048);
let answer = oai.createCompletion("tell me a short joke", max_tokens: 1024);

// in tests, the response is just an echo of the request
expect.equal(answer, Json.stringify({
mock: {
prompt:"tell me a short joke",
params:{"model":"gpt-3.5-turbo","max_tokens":2048}
params:{"model":"gpt-3.5-turbo","max_tokens":1024}
}
}));
}

0 comments on commit d4fb8ed

Please sign in to comment.