wt002 commited on
Commit
25cf5ed
·
verified ·
1 Parent(s): 4e589ad

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +4 -6
agent.py CHANGED
@@ -458,8 +458,6 @@ tools = [wiki_tool, calc_tool, file_tool, web_tool, arvix_tool, youtube_tool, vi
458
  #llm = ChatMistralAI(model="mistral-7b-instruct-v0.1")
459
 
460
 
461
-
462
- # Get the Hugging Face API token from the environment variable
463
  # Get the Hugging Face API token from the environment variable
464
  hf_token = os.getenv("HF_TOKEN")
465
 
@@ -468,13 +466,13 @@ from langchain_huggingface import HuggingFaceEndpoint
468
 
469
  # Initialize the HuggingFaceEndpoint with the desired model and parameters
470
  llm = HuggingFaceEndpoint(
471
- repo_id="code_llama/code_llama-7b-instruct",
472
  task="text-generation",
473
- huggingfacehub_api_token=os.getenv("HF_TOKEN"),
474
- temperature=0.7,
475
- max_new_tokens=1024
476
  )
477
 
 
478
  # Initialize the LangChain agent with the tool(s) and the model
479
  agent = initialize_agent(
480
  tools=tools,
 
458
  #llm = ChatMistralAI(model="mistral-7b-instruct-v0.1")
459
 
460
 
 
 
461
  # Get the Hugging Face API token from the environment variable
462
  hf_token = os.getenv("HF_TOKEN")
463
 
 
466
 
467
  # Initialize the HuggingFaceEndpoint with the desired model and parameters
468
  llm = HuggingFaceEndpoint(
469
+ repo_id="Qwen/Qwen2.5-Coder-32B-Instruct",
470
  task="text-generation",
471
+ huggingfacehub_api_token=hf_token,
472
+ model_kwargs={"temperature": 0.7, "max_new_tokens": 1024}
 
473
  )
474
 
475
+
476
  # Initialize the LangChain agent with the tool(s) and the model
477
  agent = initialize_agent(
478
  tools=tools,