Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent not persisting between questions #1

Open
bennyschmidt opened this issue Mar 16, 2024 · 0 comments · May be fixed by #2
Open

Agent not persisting between questions #1

bennyschmidt opened this issue Mar 16, 2024 · 0 comments · May be fixed by #2
Labels
api Related to the API bug Something isn't working

Comments

@bennyschmidt
Copy link
Owner

bennyschmidt commented Mar 16, 2024

Investigate and fix why the agent is not persisted in the API (but does persist when using ArthasGPT for example when using ArthasGPTCommandLine).

Problem

Because it's being instantiated each time, the bot can take longer to respond and loses context with follow-ups.

Clues

In VERBOSE mode, the user should not see the lines Creating Arthas agent... and Creating vector store... after each question is asked, only on load when the agent is instantiated.

In ArthasGPT the agent is kept in scope using a simple variable, but in the API a scoped agent is injected to the route on each invocation. It appears this agent is not being retained by the injector as it's undefined whenever a request is made (causing a new agent to spawn).

@bennyschmidt bennyschmidt linked a pull request Mar 20, 2024 that will close this issue
@bennyschmidt bennyschmidt added enhancement New feature or request api Related to the API labels Mar 20, 2024
@bennyschmidt bennyschmidt added bug Something isn't working and removed enhancement New feature or request labels Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the API bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant