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

Add support for server-side threads. #253

Merged
merged 3 commits into from
Jan 12, 2024
Merged

Conversation

drazvan
Copy link
Collaborator

@drazvan drazvan commented Jan 12, 2024

This PR adds basic support for storing threads on the server side. This is useful when the calls to the guardrails server come from an integration (e.g., with a chat plugin), and it's not straightforward to send the entire conversation history.

This is enabled by allowing an extra thread_id to be specified in the body of the requests. Check out the documentation for detailed usage, configuration and limitations.

POST /v1/chat/completions
{
    "config_id": "config_1",
    "thread_id": "1234567890123456",
    "messages": [{
      "role":"user",
      "content":"..."
    }]
}

Copy link
Collaborator

@trebedea trebedea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

docs/user_guides/server-guide.md Outdated Show resolved Hide resolved
docs/user_guides/server-guide.md Outdated Show resolved Hide resolved
docs/user_guides/server-guide.md Show resolved Hide resolved
@drazvan drazvan added this to the v0.7.0 milestone Jan 12, 2024
@drazvan drazvan self-assigned this Jan 12, 2024
Signed-off-by: Razvan Dinu <rdinu@nvidia.com>
@drazvan drazvan merged commit aa15628 into develop Jan 12, 2024
2 checks passed
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.

2 participants