-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Assist] Include embeddings in the prompt #28116
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
Changes from all commits
13215a4
f588f0d
75aa568
b1ef7ff
e93036d
d3307cb
33e0640
ba9d5ed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -121,6 +121,35 @@ message DeleteAssistantConversationRequest { | |
| string username = 2; | ||
| } | ||
|
|
||
| // GetAssistantEmbeddingsRequest is a request to get embeddings. | ||
| message GetAssistantEmbeddingsRequest { | ||
| // username is a username of the user who requested the embeddings. | ||
| string username = 1; | ||
| // query is the query used for similarity search. | ||
| string query = 2; | ||
| // limit is the number of embeddings to return (also known as k). | ||
| uint32 limit = 3; | ||
| // kind is the kind of embeddings to return (ex, node). | ||
| string kind = 4; | ||
| } | ||
|
|
||
| // EmbeddingDocument is a document with an embedding. | ||
| message EmbeddedDocument { | ||
| // id is the id of the document. | ||
| string id = 1; | ||
| // content is the content of the document. | ||
| string content = 2; | ||
| // similarityScore is the similarity score of the document. | ||
| float similarity_score = 3; | ||
| } | ||
|
|
||
| // GetAssistantEmbeddingsResponse is a response from the assistant service. | ||
| message GetAssistantEmbeddingsResponse { | ||
| // embeddings is the list of embeddings. | ||
| // The list is sorted by similarity score in descending order. | ||
| repeated EmbeddedDocument embeddings = 1; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we specify these are ordered?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added |
||
| } | ||
|
|
||
| // AssistService is a service that provides an ability to communicate with the Teleport Assist. | ||
| service AssistService { | ||
| // CreateNewConversation creates a new conversation and returns the UUID of it. | ||
|
|
@@ -144,3 +173,9 @@ service AssistService { | |
| // IsAssistEnabled returns true if the assist is enabled or not on the auth level. | ||
| rpc IsAssistEnabled(IsAssistEnabledRequest) returns (IsAssistEnabledResponse); | ||
| } | ||
|
|
||
| // AssistEmbeddingService is a service that provides an ability to communicate with the Assist Embedding service. | ||
| service AssistEmbeddingService { | ||
| // AssistantGetEmbeddings returns the embeddings for the given query. | ||
| rpc GetAssistantEmbeddings(GetAssistantEmbeddingsRequest) returns (GetAssistantEmbeddingsResponse); | ||
| } | ||
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.
should this be a oneof? stringly typed enumerations are rather fragile/unclear and this doesn't describe all possible/valid states either.
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.
Why
oneofand notenumthen? My idea was to keep it flexible, but after adding more types, we will probably need to re-route them to different sources, so we will need to rely on that type anyways.