Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ from openai import OpenAI
|
|
14 |
import os
|
15 |
|
16 |
def web_information_retrieval(user_query):
|
17 |
-
tavily_client = TavilyClient(api_key=os.
|
18 |
response = tavily_client.search(user_query, include_answer=True)['answer']
|
19 |
return response
|
20 |
|
@@ -29,7 +29,7 @@ def information_retrieval(user_query):
|
|
29 |
return chat_completion.choices[0].message.content
|
30 |
|
31 |
def e_commerce_search(user_query):
|
32 |
-
tavily_client = TavilyClient(api_key=os.
|
33 |
response = tavily_client.search(
|
34 |
user_query,
|
35 |
search_depth="advanced",
|
@@ -42,7 +42,7 @@ def e_commerce_search(user_query):
|
|
42 |
return response
|
43 |
|
44 |
def travel_and_navigation(user_query):
|
45 |
-
tavily_client = TavilyClient(api_key=os.
|
46 |
response = tavily_client.search(
|
47 |
user_query,
|
48 |
search_depth="advanced",
|
@@ -93,7 +93,7 @@ def send_calendar_invite(title, description, location, start_time, end_time, att
|
|
93 |
from openai import OpenAI
|
94 |
import json
|
95 |
|
96 |
-
client = OpenAI(api_key=os.
|
97 |
|
98 |
def run_conversation(user_query):
|
99 |
messages = [{"role": "user", "content": user_query}]
|
|
|
14 |
import os
|
15 |
|
16 |
def web_information_retrieval(user_query):
|
17 |
+
tavily_client = TavilyClient(api_key=os.environ.get('TAVILY_API_KEY'))
|
18 |
response = tavily_client.search(user_query, include_answer=True)['answer']
|
19 |
return response
|
20 |
|
|
|
29 |
return chat_completion.choices[0].message.content
|
30 |
|
31 |
def e_commerce_search(user_query):
|
32 |
+
tavily_client = TavilyClient(api_key=os.environ.get('TAVILY_API_KEY'))
|
33 |
response = tavily_client.search(
|
34 |
user_query,
|
35 |
search_depth="advanced",
|
|
|
42 |
return response
|
43 |
|
44 |
def travel_and_navigation(user_query):
|
45 |
+
tavily_client = TavilyClient(api_key=os.environ.get('TAVILY_API_KEY'))
|
46 |
response = tavily_client.search(
|
47 |
user_query,
|
48 |
search_depth="advanced",
|
|
|
93 |
from openai import OpenAI
|
94 |
import json
|
95 |
|
96 |
+
client = OpenAI(api_key=os.environ.get('OPENAI_API_KEY'))
|
97 |
|
98 |
def run_conversation(user_query):
|
99 |
messages = [{"role": "user", "content": user_query}]
|