Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import agentops, os
|
|
3 |
|
4 |
from crew import get_crew
|
5 |
|
6 |
-
LLM = "gpt-
|
7 |
|
8 |
def invoke(openai_api_key, topic):
|
9 |
if (openai_api_key == ""):
|
@@ -11,17 +11,10 @@ def invoke(openai_api_key, topic):
|
|
11 |
if (topic == ""):
|
12 |
raise gr.Error("Topic is required.")
|
13 |
|
14 |
-
os.environ["
|
15 |
-
#os.environ["SERPER_API_KEY"] = serper_api_key
|
16 |
-
|
17 |
-
AGENTOPS_API_KEY = os.environ["AGENTOPS_API_KEY"]
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
#openai = OpenAI(api_key=OPENAI_API_KEY)
|
22 |
|
23 |
-
agentops.init(AGENTOPS_API_KEY)
|
24 |
-
|
25 |
return get_crew(LLM).kickoff(inputs={"topic": topic})
|
26 |
|
27 |
gr.close_all()
|
|
|
3 |
|
4 |
from crew import get_crew
|
5 |
|
6 |
+
LLM = "gpt-4o"
|
7 |
|
8 |
def invoke(openai_api_key, topic):
|
9 |
if (openai_api_key == ""):
|
|
|
11 |
if (topic == ""):
|
12 |
raise gr.Error("Topic is required.")
|
13 |
|
14 |
+
agentops.init(os.environ["AGENTOPS_API_KEY"])
|
|
|
|
|
|
|
15 |
|
16 |
+
os.environ["OPENAI_API_KEY"] = openai_api_key
|
|
|
|
|
17 |
|
|
|
|
|
18 |
return get_crew(LLM).kickoff(inputs={"topic": topic})
|
19 |
|
20 |
gr.close_all()
|