Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,19 +29,6 @@ def initialize_components():
|
|
| 29 |
SERPAPI_API_KEY="619f2302253fbe56448bcf82565caf2a3263d845944682533f10b09a0d1650e6"
|
| 30 |
|
| 31 |
# openai.api_key=OPENAI_API_KEY
|
| 32 |
-
|
| 33 |
-
# Setup and use the ClearML Callback
|
| 34 |
-
clearml_callback = ClearMLCallbackHandler(
|
| 35 |
-
task_type="inference",
|
| 36 |
-
project_name="langchain_callback_demo",
|
| 37 |
-
task_name="llm",
|
| 38 |
-
tags=["test"],
|
| 39 |
-
# Change the following parameters based on the amount of detail you want tracked
|
| 40 |
-
visualize=True,
|
| 41 |
-
complexity_metrics=True,
|
| 42 |
-
stream_logs=True,)
|
| 43 |
-
|
| 44 |
-
callbacks = [StdOutCallbackHandler(), clearml_callback]
|
| 45 |
|
| 46 |
llm = ChatOpenAI(
|
| 47 |
model_name="gpt-3.5-turbo",
|
|
@@ -57,7 +44,7 @@ def initialize_components():
|
|
| 57 |
query_memory = SimpleMemory()
|
| 58 |
|
| 59 |
# Initialize planning agent with both memories
|
| 60 |
-
planning_agent.initialize_planning_agent(llm, chat_memory, query_memory
|
| 61 |
|
| 62 |
logger.info("Components initialized successfully")
|
| 63 |
|
|
|
|
| 29 |
SERPAPI_API_KEY="619f2302253fbe56448bcf82565caf2a3263d845944682533f10b09a0d1650e6"
|
| 30 |
|
| 31 |
# openai.api_key=OPENAI_API_KEY
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
llm = ChatOpenAI(
|
| 34 |
model_name="gpt-3.5-turbo",
|
|
|
|
| 44 |
query_memory = SimpleMemory()
|
| 45 |
|
| 46 |
# Initialize planning agent with both memories
|
| 47 |
+
planning_agent.initialize_planning_agent(llm, chat_memory, query_memory)
|
| 48 |
|
| 49 |
logger.info("Components initialized successfully")
|
| 50 |
|