Skip to content

Commit

Permalink
Merge pull request #54 from eltonfonseca/remove-api-key-from-body
Browse files Browse the repository at this point in the history
Fix OpenAI returns "Unrecognized request argument supplied: api_key"
  • Loading branch information
brainlid authored Dec 12, 2023
2 parents 86499bd + 7c12e28 commit b0d89a0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/chat_models/chat_open_ai.ex
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ defmodule LangChain.ChatModels.ChatOpenAI do
def for_api(%ChatOpenAI{} = openai, messages, functions) do
%{
model: openai.model,
api_key: openai.api_key,
temperature: openai.temperature,
frequency_penalty: openai.frequency_penalty,
n: openai.n,
Expand Down
1 change: 0 additions & 1 deletion test/chat_models/chat_open_ai_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ defmodule LangChain.ChatModels.ChatOpenAITest do
assert data.temperature == 1
assert data.frequency_penalty == 0.5
assert data.response_format == %{"type" => "text"}
assert data.api_key == "api_key"
end

test "generates a map for an API call with JSON response set to true" do
Expand Down

0 comments on commit b0d89a0

Please sign in to comment.