-
Notifications
You must be signed in to change notification settings - Fork 12
Feat: Add ContextualAI's Generative and Reranker Client #194
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
🛡️ The following IaC misconfigurations have been detected
| NAME | FILE | ||
|---|---|---|---|
| Controller creating containers without dropped capabilities | ...ompose-anon-bind.yml | View in code | |
| Controller creating containers without dropped capabilities | ...ompose-anon-clip.yml | View in code | |
| Controller creating containers without dropped capabilities | ...ker-compose-anon.yml | View in code | |
| Controller creating containers without dropped capabilities | ...ker-compose-rbac.yml | View in code | |
| Controller creating containers without dropped capabilities | ...ker-compose-rbac.yml | View in code | |
| Controller creating containers without dropped capabilities | ...pose-three-nodes.yml | View in code | |
| Controller creating containers without dropped capabilities | ...pose-three-nodes.yml | View in code | |
| Controller creating containers without dropped capabilities | ...s/docker-compose.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...r-compose-anon-2.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...ompose-anon-bind.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...ompose-anon-bind.yml | View in code | |
| Shared Volumes Between Containers | ...ompose-anon-bind.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...ompose-anon-clip.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...ompose-anon-clip.yml | View in code | |
| Shared Volumes Between Containers | ...ompose-anon-clip.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...ose-anon-offload.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...ker-compose-anon.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...ker-compose-anon.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...ker-compose-rbac.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...ker-compose-rbac.yml | View in code | |
| Shared Volumes Between Containers | ...ker-compose-rbac.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...pose-three-nodes.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...pose-three-nodes.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...pose-three-nodes.yml | View in code | |
| Ensure that, if applicable, SELinux security options are set (Automated) | ...s/docker-compose.yml | View in code | |
| ... | ... | ... | ... |
|
To avoid any confusion in the future about your contribution to Weaviate, we work with a Contributor License Agreement. If you agree, you can simply add a comment to this PR that you agree with the CLA so that we can merge. |
| - `systemPrompt`: Instructions that the model follows when generating responses. Note that we do not guarantee that the model follows these instructions exactly (optional) | ||
| - `avoidCommentary`: Flag to indicate whether the model should avoid providing additional commentary in responses. Commentary is conversational in nature and does not contain verifiable claims; therefore, commentary is not strictly grounded in available context. However, commentary may provide useful context which improves the helpfulness of responses (defaults to `false`) | ||
|
|
||
| Additional `knowledge` array can be provided at runtime for RAG scenarios. The knowledge sources the model can use when generating a response are required for proper grounded generation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jinashrouniyar-268, where does the user provide this knowledge array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@databyjp - The user provides the knowledge array at runtime, as part of the generative request parameters. By default, the system uses the extracted text from retrieved objects (via extractKnowledge), but if we want to override that, we can explicitly include a knowledge array in the request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. But where would the user provide this parameter on the client-side with the Weaviate integration?
For example, I don't see a parameter to do so here: https://github.com/weaviate/weaviate-python-client/pull/1843/files#diff-2c54e9361b54273478c9e5987a8b7526b0934737d16b40c0bdd98dcc53c80430R865 or here: https://github.com/weaviate/weaviate-python-client/pull/1843/files#diff-cdd2206ceff3b84b9b6e8ff39382c5a66d37b664722829b53f441d273bc1a4ccR610
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@databyjp Thank you for pointing this out. I have updated Python and Typescript clients to support knowledge array params on client-side as they are already supported in our go modules. Hopefully, this should clear your doubts. Here are the commits:
weaviate/weaviate-python-client@4d7bbee
weaviate/typescript-client@c984908
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic, thank you. I've added this amendment to the docs:
#232
|
Hi @jinashrouniyar-268 thank you for this! :) We had started building this PR in parallel; we will incorporate aspects of this PR into #227. Thank you for your understanding. |
What's being changed:
Updated Documentation to include Contextual AI Generative and Reranker Client. Please refer to this PR for reference:
weaviate/weaviate#9338
Type of change:
How has this been tested?
yarn start