Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ llm = ChatOpenAI(model='gpt-3.5-turbo', temperature=0.0)
|
|
35 |
stage_analyzer_chain = LLMChain(
|
36 |
llm=llm,
|
37 |
prompt=stage_analyzer_inception_prompt,
|
38 |
-
verbose=
|
39 |
output_key="stage_number")
|
40 |
|
41 |
df = pd.read_json('./data/unified_wine_data.json', encoding='utf-8', lines=True)
|
@@ -86,7 +86,7 @@ vectorstore = Chroma.from_documents(docs, embeddings)
|
|
86 |
document_content_description = "Database of a wine"
|
87 |
llm = OpenAI(temperature=0)
|
88 |
retriever = SelfQueryRetriever.from_llm(
|
89 |
-
llm, vectorstore, document_content_description, metadata_field_info, verbose=
|
90 |
) # Added missing closing parenthesis
|
91 |
|
92 |
def search_with_url(query):
|
@@ -227,7 +227,7 @@ class CustomOutputParser(AgentOutputParser):
|
|
227 |
|
228 |
output_parser = CustomOutputParser()
|
229 |
|
230 |
-
llm_chain = LLMChain(llm=ChatOpenAI(model='gpt-4', temperature=0.0), prompt=prompt, verbose=
|
231 |
|
232 |
tool_names = [tool.name for tool in tools]
|
233 |
agent = LLMSingleActionAgent(
|
@@ -237,7 +237,7 @@ agent = LLMSingleActionAgent(
|
|
237 |
allowed_tools=tool_names
|
238 |
)
|
239 |
|
240 |
-
agent_executor = AgentExecutor.from_agent_and_tools(agent=agent, tools=tools, verbose=
|
241 |
|
242 |
import gradio as gr
|
243 |
|
|
|
35 |
stage_analyzer_chain = LLMChain(
|
36 |
llm=llm,
|
37 |
prompt=stage_analyzer_inception_prompt,
|
38 |
+
verbose=False,
|
39 |
output_key="stage_number")
|
40 |
|
41 |
df = pd.read_json('./data/unified_wine_data.json', encoding='utf-8', lines=True)
|
|
|
86 |
document_content_description = "Database of a wine"
|
87 |
llm = OpenAI(temperature=0)
|
88 |
retriever = SelfQueryRetriever.from_llm(
|
89 |
+
llm, vectorstore, document_content_description, metadata_field_info, verbose=False
|
90 |
) # Added missing closing parenthesis
|
91 |
|
92 |
def search_with_url(query):
|
|
|
227 |
|
228 |
output_parser = CustomOutputParser()
|
229 |
|
230 |
+
llm_chain = LLMChain(llm=ChatOpenAI(model='gpt-4', temperature=0.0), prompt=prompt, verbose=False,)
|
231 |
|
232 |
tool_names = [tool.name for tool in tools]
|
233 |
agent = LLMSingleActionAgent(
|
|
|
237 |
allowed_tools=tool_names
|
238 |
)
|
239 |
|
240 |
+
agent_executor = AgentExecutor.from_agent_and_tools(agent=agent, tools=tools, verbose=False)
|
241 |
|
242 |
import gradio as gr
|
243 |
|