Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Generates irrelevant / too much conversation? #24

Closed
sarperdag opened this issue Apr 13, 2023 · 5 comments
Closed

Generates irrelevant / too much conversation? #24

sarperdag opened this issue Apr 13, 2023 · 5 comments
Assignees

Comments

@sarperdag
Copy link

Sometimes, when I simple just type "hi" as an input. The response is a whole conversation generated between human and the assistant. I only want assistant's responses to be generated. Why might this be happening?

@shahrukhx01
Copy link
Contributor

shahrukhx01 commented Apr 13, 2023

@sarperdag It seems you are starting another conversation in the existing session. In that case, you can just explicitly initiate a new chat session by not sending the conversation_id, and in the response you'd receive a new conversation_id for the new session. Then the subsequent messages can be sent to the new session. You can also get rid of the older sessions in the following way:

memory_manager.remove_conversation(Memory(conversation_id="1"))

@shahrukhx01 shahrukhx01 self-assigned this Apr 13, 2023
@sarperdag
Copy link
Author

Thanks but I think I wasn't able to explain the problem clearly. Here's a screenshot of what's happening. The conversation id is 1, I'm just starting the conversation, redis db is totally empty, and I'm getting this as the response.

2886e273-e49b-49d5-9898-383898b99a3e

@sarperdag sarperdag changed the title Generates irrelevant / much conversation? Generates irrelevant / too much conversation? Apr 13, 2023
@shahrukhx01
Copy link
Contributor

@sarperdag, it seems like it this problem is occurring since you appended an additional prompt template and we already have a fixed prompt template. If you'd like to change the prompt template to yours you can do so by modifying the get_prompt utility function. Please do let us know if this resolves this behavior.

@sarperdag
Copy link
Author

sarperdag commented Apr 15, 2023

Nope, I'm modifying the prompt template under the get_prompt function. There is no additional prompt I'm appending. The issue occurs randomly, like 20% of the time. Not always.

@shahrukhx01
Copy link
Contributor

@sarperdag I suspect this could be occurring due to how the prompt is formulated, maybe rephrasing it somehow might help it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants