Find answers from the community

Home
Members
kornberg
k
kornberg
Offline, last seen 3 months ago
Joined September 25, 2024
Is there a way to change the system prompt for the OpenAI agent without creating a new OpenAI agent object? I tried editing the prefix_messages attribute but it doesn't seem to propagate the new system prompt
Edit: I think I need to use chat_agent.agent_worker.prefix_messages
1 comment
L
Trying to make an API for an OpenAI agent, how can I manually set the chat history of the agent?
1 comment
W
k
kornberg
·

Chat history

If I'm setting up LlamaIndex in an API, is it rationale for me to have a static "chat_engine" that I simply replace the chat_history with every time I get a request? By literalyl doing
Plain Text
engine.chat_history = x
2 comments
k
L
Is there a way to easily replicate the behavior of the OpenAiAssistantAgent using the OpenAIAgent? I want to manage my own conversation history and not mess with the threads, but OpenAIAgent seems to perform much worse than OpenAiAssistantAgent
3 comments
L
k
Trying to follow this guide to use extractors:
https://docs.llamaindex.ai/en/stable/examples/metadata_extraction/MetadataExtraction_LLMSurvey.html#automated-metadata-extraction-for-better-retrieval-synthesis

However I get an error when I attempt to run the pipeline:
Plain Text
RuntimeError: asyncio.run() cannot be called from a running event loop


Has anyone encountered this? My nodes simply have text in them so i'm not sure where the issue could be unless this guide is out of date
2 comments
k
L