Spaces:
Build error
Build error
Refactor graph.py and test_agent.py by removing unused imports to streamline code and improve readability. This includes the removal of uuid, requests, and unnecessary components from langchain_core.
Browse files- graph.py +2 -7
- test_agent.py +0 -2
graph.py
CHANGED
@@ -2,19 +2,14 @@
|
|
2 |
|
3 |
import logging
|
4 |
import os
|
5 |
-
import
|
6 |
-
from typing import Dict, List, Optional, TypedDict, Union, cast
|
7 |
|
8 |
import yaml
|
9 |
-
from langchain_core.language_models import BaseChatModel
|
10 |
from langchain_core.messages import AIMessage, HumanMessage, SystemMessage
|
11 |
-
from langchain_core.output_parsers import StrOutputParser
|
12 |
-
from langchain_core.prompts import ChatPromptTemplate
|
13 |
from langchain_core.runnables import RunnableConfig
|
14 |
from langgraph.graph import END, StateGraph
|
15 |
-
from langgraph.prebuilt import ToolExecutor, ToolNode
|
16 |
from langgraph.types import interrupt
|
17 |
-
from smolagents import CodeAgent, LiteLLMModel
|
18 |
|
19 |
from configuration import Configuration
|
20 |
from tools import tools
|
|
|
2 |
|
3 |
import logging
|
4 |
import os
|
5 |
+
from typing import Dict, List, Optional, TypedDict, Union
|
|
|
6 |
|
7 |
import yaml
|
|
|
8 |
from langchain_core.messages import AIMessage, HumanMessage, SystemMessage
|
|
|
|
|
9 |
from langchain_core.runnables import RunnableConfig
|
10 |
from langgraph.graph import END, StateGraph
|
|
|
11 |
from langgraph.types import interrupt
|
12 |
+
from smolagents import CodeAgent, LiteLLMModel
|
13 |
|
14 |
from configuration import Configuration
|
15 |
from tools import tools
|
test_agent.py
CHANGED
@@ -1,8 +1,6 @@
|
|
1 |
import logging
|
2 |
|
3 |
import pytest
|
4 |
-
import requests
|
5 |
-
from langgraph.types import Command
|
6 |
|
7 |
from agent import AgentRunner
|
8 |
|
|
|
1 |
import logging
|
2 |
|
3 |
import pytest
|
|
|
|
|
4 |
|
5 |
from agent import AgentRunner
|
6 |
|