Update app_langgraph.py
Browse files- app_langgraph.py +7 -14
app_langgraph.py
CHANGED
|
@@ -31,25 +31,18 @@ tools = [
|
|
| 31 |
|
| 32 |
def build_graph():
|
| 33 |
hf_token = os.getenv("HF_TOKEN")
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
# )
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|
| 42 |
|
| 43 |
# llm = ChatGroq(model="qwen-qwq-32b", temperature=0)
|
| 44 |
# llm_with_tools = llm.bind_tools(tools)
|
| 45 |
|
| 46 |
-
|
| 47 |
-
model= "gemini-2.5-pro-preview-05-06",
|
| 48 |
-
temperature=0,
|
| 49 |
-
max_retries=2,
|
| 50 |
-
google_api_key=api_key,
|
| 51 |
-
thinking_budget= 0
|
| 52 |
-
)
|
| 53 |
chat_with_tools = chat.bind_tools(tools)
|
| 54 |
|
| 55 |
def assistant(state: MessagesState):
|
|
|
|
| 31 |
|
| 32 |
def build_graph():
|
| 33 |
hf_token = os.getenv("HF_TOKEN")
|
| 34 |
+
llm = HuggingFaceEndpoint(
|
| 35 |
+
repo_id="Qwen/Qwen2.5-Coder-32B-Instruct",
|
| 36 |
+
huggingfacehub_api_token=hf_token,
|
| 37 |
+
)
|
|
|
|
| 38 |
|
| 39 |
+
chat = ChatHuggingFace(llm=llm, verbose=True)
|
| 40 |
+
chat_with_tools = chat.bind_tools(tools)
|
| 41 |
|
| 42 |
# llm = ChatGroq(model="qwen-qwq-32b", temperature=0)
|
| 43 |
# llm_with_tools = llm.bind_tools(tools)
|
| 44 |
|
| 45 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
chat_with_tools = chat.bind_tools(tools)
|
| 47 |
|
| 48 |
def assistant(state: MessagesState):
|