Artsem Radzevich commited on
Commit
0a9644e
·
1 Parent(s): ebd0c81

Moved to OpenAi

Browse files
Files changed (2) hide show
  1. .env +2 -1
  2. agent_config.py +2 -2
.env CHANGED
@@ -1 +1,2 @@
1
- HF_API_KEY= <your_huggingface_api_key>
 
 
1
+ HF_API_KEY= <your_huggingface_api_key>
2
+ OPENAI_API_KEY= <your_openai_api_key>
agent_config.py CHANGED
@@ -11,12 +11,12 @@ def create_agent():
11
  CodeAgent: The configured agent instance.
12
  """
13
  # Load API key from environment variable (more secure)
14
- token = os.getenv("HF_API_KEY")
15
  if not token:
16
  raise RuntimeError("Missing Hugging Face API key. Set HF_API_KEY environment variable.")
17
 
18
  # Initialize the LLM model
19
- model = HfApiModel(token=token, model_id="meta-llama/Llama-3-8b-chat-hf", provider="together")
20
 
21
  # Initialize tools
22
  wiki_tool = WikiTool() # Custom Wikipedia wrapper
 
11
  CodeAgent: The configured agent instance.
12
  """
13
  # Load API key from environment variable (more secure)
14
+ token = os.getenv("OPENAI_API_KEY")
15
  if not token:
16
  raise RuntimeError("Missing Hugging Face API key. Set HF_API_KEY environment variable.")
17
 
18
  # Initialize the LLM model
19
+ model = HfApiModel(token=token, model_id="gpt-4", provider="openai")
20
 
21
  # Initialize tools
22
  wiki_tool = WikiTool() # Custom Wikipedia wrapper