wt002 commited on
Commit
b31aeee
·
verified ·
1 Parent(s): 52ec889

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -3
agent.py CHANGED
@@ -467,15 +467,14 @@ hf_token = os.getenv("HF_TOKEN")
467
  from langchain_huggingface import HuggingFaceEndpoint
468
 
469
  # Initialize the HuggingFaceEndpoint with the desired model and parameters
470
- llm = HuggingFaceEndpoint(
471
  repo_id="Qwen/Qwen2.5-Coder-32B-Instruct",
472
  task="text-generation",
473
  huggingfacehub_api_token=os.getenv("HF_TOKEN"),
474
  temperature=0.7,
475
- model_kwargs={"max_length": 1024}
476
  )
477
 
478
-
479
  # Initialize the LangChain agent with the tool(s) and the model
480
  agent = initialize_agent(
481
  tools=tools,
 
467
  from langchain_huggingface import HuggingFaceEndpoint
468
 
469
  # Initialize the HuggingFaceEndpoint with the desired model and parameters
470
+ qwen_model = HuggingFaceEndpoint(
471
  repo_id="Qwen/Qwen2.5-Coder-32B-Instruct",
472
  task="text-generation",
473
  huggingfacehub_api_token=os.getenv("HF_TOKEN"),
474
  temperature=0.7,
475
+ max_length=1024
476
  )
477
 
 
478
  # Initialize the LangChain agent with the tool(s) and the model
479
  agent = initialize_agent(
480
  tools=tools,