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

fix: Groups conversations based on the user's messages. #546

Merged
merged 1 commit into from
Jan 13, 2025
Merged

Conversation

aponcedeleonch
Copy link
Contributor

Closes: #419

Before we could use the chat_id at the output messages as means to group the messages into conversations. This logic is not working anymore.

The new logic takes into account the user messages provided as input to the LLM to map the messages into conversations. Usually LLMs receive all last user messages. Example:

req1 = {messages:[{"role": "user", "content": "hello"}]}
req2 = {messages:[{"role": "user", "content": "hello"}, {"role": "user", "content": "how are you?}]}

In this last example, req1 and req2 should be mapped together to form a conversation

Closes: #419

Before we could use the `chat_id` at the output messages as means
to group the messages into conversations. This logic is not working
anymore.

The new logic takes into account the user messages provided as
input to the LLM to map the messages into conversations. Usually LLMs
receive all last user messages. Example:
```
req1 = {messages:[{"role": "user", "content": "hello"}]}
req2 = {messages:[{"role": "user", "content": "hello"}, {"role": "user", "content": "how are you?}]}
```

In this last example, `req1` and `req2` should be mapped together to
form a conversation
@aponcedeleonch aponcedeleonch requested a review from yrobla January 10, 2025 16:06
@lukehinds lukehinds merged commit c48969c into main Jan 13, 2025
2 checks passed
@lukehinds lukehinds deleted the issue-419 branch January 13, 2025 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prompts should be grouped
2 participants