Skip to content

Commit

Permalink
fixed tests for recent PR
Browse files Browse the repository at this point in the history
  • Loading branch information
brainlid committed Jan 30, 2025
1 parent abf059e commit 3c1260c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/chat_models/chat_open_ai_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ defmodule LangChain.ChatModels.ChatOpenAITest do
assert data.model == @test_model
assert data.temperature == 1
assert data.frequency_penalty == 0.5
assert data.response_format == %{"type" => "text"}
# NOTE: %{"type" => "text"} is the default when not specified
assert data[:response_format] == nil
end

test "generates a map for an API call with JSON response set to true" do
Expand Down Expand Up @@ -2178,7 +2179,8 @@ defmodule LangChain.ChatModels.ChatOpenAITest do

data = ChatOpenAI.for_api(openai, [], [])

assert data.response_format == %{"type" => "text"}
# NOTE: %{"type" => "text"} is the default
assert data[:response_format] == nil
end

test "generates a map for an API call with json_object format when json_response is true and no schema" do
Expand Down

0 comments on commit 3c1260c

Please sign in to comment.