Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
|
@@ -2,8 +2,6 @@ import gradio as gr
|
|
| 2 |
import os
|
| 3 |
import requests
|
| 4 |
|
| 5 |
-
from langchain_community.tools import WikipediaQueryRun
|
| 6 |
-
from langchain_community.utilities import WikipediaAPIWrapper
|
| 7 |
from langchain_tavily import TavilySearch
|
| 8 |
from langfuse import Langfuse, get_client
|
| 9 |
from langfuse.langchain import CallbackHandler
|
|
@@ -11,22 +9,17 @@ import pandas as pd
|
|
| 11 |
|
| 12 |
from src.agent import Agent
|
| 13 |
from src.tools import (
|
| 14 |
-
multiply, add, subtract, divide, modulus
|
| 15 |
)
|
| 16 |
|
| 17 |
tools = [
|
| 18 |
-
multiply, add, subtract, divide, modulus,
|
| 19 |
]
|
| 20 |
tools.append(
|
| 21 |
TavilySearch(
|
| 22 |
max_results=5,
|
| 23 |
)
|
| 24 |
)
|
| 25 |
-
tools.append(
|
| 26 |
-
WikipediaQueryRun(
|
| 27 |
-
api_wrapper=WikipediaAPIWrapper()
|
| 28 |
-
)
|
| 29 |
-
)
|
| 30 |
|
| 31 |
Langfuse(
|
| 32 |
public_key=os.environ.get("LANGFUSE_PUBLIC_KEY"),
|
|
|
|
| 2 |
import os
|
| 3 |
import requests
|
| 4 |
|
|
|
|
|
|
|
| 5 |
from langchain_tavily import TavilySearch
|
| 6 |
from langfuse import Langfuse, get_client
|
| 7 |
from langfuse.langchain import CallbackHandler
|
|
|
|
| 9 |
|
| 10 |
from src.agent import Agent
|
| 11 |
from src.tools import (
|
| 12 |
+
multiply, add, subtract, divide, modulus, wiki_search
|
| 13 |
)
|
| 14 |
|
| 15 |
tools = [
|
| 16 |
+
multiply, add, subtract, divide, modulus, wiki_search
|
| 17 |
]
|
| 18 |
tools.append(
|
| 19 |
TavilySearch(
|
| 20 |
max_results=5,
|
| 21 |
)
|
| 22 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
Langfuse(
|
| 25 |
public_key=os.environ.get("LANGFUSE_PUBLIC_KEY"),
|