cowrycode commited on
Commit
32893bf
·
verified ·
1 Parent(s): 037b68f

Update gaia_agent.py

Browse files
Files changed (1) hide show
  1. gaia_agent.py +6 -1
gaia_agent.py CHANGED
@@ -31,6 +31,7 @@ import chess
31
  import chess.engine
32
  # import tempfile
33
  # from PIL import Image
 
34
 
35
 
36
 
@@ -60,7 +61,11 @@ api_key = os.getenv("HF_TOKEN")
60
  # huggingfacehub_api_token=api_key,
61
  # timeout=300,
62
  # )
63
- llm = OpenAI(model="gpt-4o-mini", temperature=0.2, api_key=OpenAI_key)
 
 
 
 
64
 
65
  # # Initialize local Ollama model
66
  # llm Ollama(model="qwen2.5-coder", base_url="http://127.0.0.1:11434")
 
31
  import chess.engine
32
  # import tempfile
33
  # from PIL import Image
34
+ from langchain.chat_models import ChatOpenAI
35
 
36
 
37
 
 
61
  # huggingfacehub_api_token=api_key,
62
  # timeout=300,
63
  # )
64
+ llm = ChatOpenAI(
65
+ model_name="gpt-4o-mini", # use model_name instead of model
66
+ temperature=0.2,
67
+ openai_api_key=OpenAI_key
68
+ )
69
 
70
  # # Initialize local Ollama model
71
  # llm Ollama(model="qwen2.5-coder", base_url="http://127.0.0.1:11434")