Update app.py
Browse files
app.py
CHANGED
@@ -2,14 +2,6 @@ import gradio as gr
|
|
2 |
import getpass
|
3 |
import os
|
4 |
|
5 |
-
def _set_if_undefined(var: str):
|
6 |
-
if not os.environ.get(var):
|
7 |
-
os.environ[var] = getpass.getpass(f"Please provide your {var}")
|
8 |
-
|
9 |
-
_set_if_undefined("OPENAI_API_KEY")
|
10 |
-
_set_if_undefined("LANGCHAIN_API_KEY")
|
11 |
-
_set_if_undefined("TAVILY_API_KEY")
|
12 |
-
|
13 |
# Optional, add tracing in LangSmith
|
14 |
os.environ["LANGCHAIN_TRACING_V2"] = "true"
|
15 |
os.environ["LANGCHAIN_PROJECT"] = "Multi-agent Collaboration"
|
@@ -102,7 +94,6 @@ def agent_node(state, agent, name):
|
|
102 |
"sender": name,
|
103 |
}
|
104 |
|
105 |
-
|
106 |
llm = ChatOpenAI(model="gpt-4-1106-preview")
|
107 |
|
108 |
# Research agent and node
|
|
|
2 |
import getpass
|
3 |
import os
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
# Optional, add tracing in LangSmith
|
6 |
os.environ["LANGCHAIN_TRACING_V2"] = "true"
|
7 |
os.environ["LANGCHAIN_PROJECT"] = "Multi-agent Collaboration"
|
|
|
94 |
"sender": name,
|
95 |
}
|
96 |
|
|
|
97 |
llm = ChatOpenAI(model="gpt-4-1106-preview")
|
98 |
|
99 |
# Research agent and node
|