From 66ef2912ac7fdf866e30f84cbb79d32be2b89dd7 Mon Sep 17 00:00:00 2001 From: jinno Date: Sat, 18 May 2024 16:55:52 +0900 Subject: [PATCH] fix: ChatOpenAI setting --- src/codeinterpreterapi/llm/llm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/codeinterpreterapi/llm/llm.py b/src/codeinterpreterapi/llm/llm.py index 0a7ea1c0..7bc0c39d 100644 --- a/src/codeinterpreterapi/llm/llm.py +++ b/src/codeinterpreterapi/llm/llm.py @@ -25,11 +25,11 @@ def get_llm(cls) -> BaseChatModel: timeout=settings.REQUEST_TIMEOUT, ) # type: ignore if settings.OPENAI_API_KEY: - from langchain_openai import ChatGoogleGenerativeAI + from langchain_openai import ChatOpenAI - return ChatGoogleGenerativeAI( + return ChatOpenAI( model=model, - api_key=settings.GEMINI_API_KEY, + api_key=settings.OPENAI_API_KEY, timeout=settings.REQUEST_TIMEOUT, temperature=settings.TEMPERATURE, max_retries=settings.MAX_RETRY,