Update agent.py
Browse files
agent.py
CHANGED
|
@@ -2,7 +2,7 @@ import os
|
|
| 2 |
import pandas as pd
|
| 3 |
from langchain_core.messages import HumanMessage, AIMessage
|
| 4 |
from langgraph.graph import StateGraph, MessagesState
|
| 5 |
-
from langchain_huggingface import HuggingFaceEndpoint
|
| 6 |
from tools import TOOLS
|
| 7 |
|
| 8 |
# --- Read local QA data for retriever ---
|
|
@@ -16,7 +16,9 @@ qa_dict = {
|
|
| 16 |
def build_graph():
|
| 17 |
# Initialize Mistral model
|
| 18 |
llm = HuggingFaceEndpoint(
|
| 19 |
-
repo_id="mistralai/Mistral-7B-Instruct-v0.3",
|
|
|
|
|
|
|
| 20 |
huggingfacehub_api_token=os.environ["HF_TOKEN"]
|
| 21 |
)
|
| 22 |
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
from langchain_core.messages import HumanMessage, AIMessage
|
| 4 |
from langgraph.graph import StateGraph, MessagesState
|
| 5 |
+
from langchain_huggingface import HuggingFaceEndpoint, HuggingFaceInferenceAPI
|
| 6 |
from tools import TOOLS
|
| 7 |
|
| 8 |
# --- Read local QA data for retriever ---
|
|
|
|
| 16 |
def build_graph():
|
| 17 |
# Initialize Mistral model
|
| 18 |
llm = HuggingFaceEndpoint(
|
| 19 |
+
# repo_id="mistralai/Mistral-7B-Instruct-v0.3",
|
| 20 |
+
llm = HuggingFaceInferenceAPI(model_name="Qwen/Qwen2.5-Coder-32B-Instruct"),
|
| 21 |
+
# task="conver"
|
| 22 |
huggingfacehub_api_token=os.environ["HF_TOKEN"]
|
| 23 |
)
|
| 24 |
|