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

Added Seed in ModelParams for Summarization Requests #39

Merged
merged 10 commits into from
Aug 15, 2024
20 changes: 20 additions & 0 deletions admin.proto
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ message Corpus {

repeated Dimension custom_dimensions = 13;
repeated FilterAttribute filter_attributes = 14;

}


// A custom dimension is additional numeric metadata that you want to affect
// Vectara's scoring. For example, these could be "number of stars" ratings,
// or other business metrics like a product's margins that you want to use
Expand Down Expand Up @@ -120,6 +122,20 @@ message CreateCorpusResponse {
Status status = 2;
}

message UpdateCorpusRequest {
// Corpus id to update.
uint32 id = 1;
// Name to be updated.
optional string name = 2;
// Description to be updated.
optional string description = 3;
}

message UpdateCorpusResponse {
// The Status of the update.
Status status = 1;
}

message DeleteCorpusRequest {
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
json_schema: { required: [ "customerId", "corpusId" ] }
Expand Down Expand Up @@ -205,6 +221,8 @@ message CorpusSize {
int64 epoch_secs = 1;

// The size of the corpus.
// This is the sum of the number of characters in the
// text and metadata of all documents in the corpus.
uint64 size = 2;
}

Expand All @@ -224,6 +242,7 @@ message ReadCorpusRequest {
bool read_custom_dimensions = 1004;
// Set to true to read the filter attributes of the corpus.
bool read_filter_attributes = 1005;

}

message ReadCorpusResponse {
Expand All @@ -249,6 +268,7 @@ message ReadCorpusResponse {
repeated FilterAttribute filter_attribute = 6;
// Status of the filter attributes.
Status filter_attribute_status = 1006;

}

// Information about the requested corpora.
Expand Down
1 change: 1 addition & 0 deletions common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ message StorageQuota {
// storage quota.
int64 num_metadata_chars = 2;
}

1 change: 1 addition & 0 deletions core_services.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ message IndexCoreDocumentRequest {
int64 corpus_id = 2;
// The document being indexed.
com.vectara.indexing.CoreDocument document = 3;

}

message IndexCoreDocumentResponse {
Expand Down
9 changes: 9 additions & 0 deletions services.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ message IndexDocumentRequest {
int64 corpus_id = 2;
// The Document to index.
com.vectara.indexing.Document document = 3;

}

message IndexDocumentResponse {
Expand Down Expand Up @@ -104,6 +105,14 @@ service AdminService {
};
}

rpc UpdateCorpus(com.vectara.admin.UpdateCorpusRequest)
returns (com.vectara.admin.UpdateCorpusResponse) {
option (google.api.http) = {
post: "/v1/update-corpus"
body: "*"
};
}

rpc DeleteCorpus(com.vectara.admin.DeleteCorpusRequest) returns (com.vectara.admin.DeleteCorpusResponse){
option (google.api.http) = {
post: "/v1/delete-corpus"
Expand Down
15 changes: 13 additions & 2 deletions serving.proto
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ message SummarizationRequest {
// Higher values penalize new tokens based on whether they appear in the text so far,
// increasing the model's likelihood to talk about new topics.
optional float presence_penalty = 20;
// This feature is in Beta. If specified, the LLM will make a best effort to sample deterministically,
// such that repeated requests with the same seed and parameters should return the same result.
// Note:- Seed value is only used when temperature is set to 0.
optional uint32 seed = 25;
}
ModelParams model_params = 215;

Expand Down Expand Up @@ -159,6 +163,8 @@ message QueryRequest {
// chars_before is used for showing the end user the characters leading up
// to the result snippet. This can help the end-user understand the
// context of that result. Ignored if sentences_before is set.
// Vectara will capture the full sentence that contains the captured characters,
// so as to not lose the meaning caused by a truncated word or sentence.
int32 chars_before = 5 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "30"
Expand All @@ -167,6 +173,8 @@ message QueryRequest {
// chars_after is used for showing the end user the characters after the
// result snippet. This can help the end-user understand the context of
// that result. Ignored if sentences_before is set.
// Vectara will capture the full sentence that contains the captured characters,
// so as to not lose the meaning caused by a truncated word or sentence.
int32 chars_after = 10 [
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
example: "30"
Expand Down Expand Up @@ -216,13 +224,17 @@ message QueryRequest {
message RerankingConfig {
// Which reranking model to use if reranking. Currently, the only IDs
// available are:
// - 272725717, HuggingFace Open Source x-attentional reranker
// - 272725718, Maximum Marginal Relevance Reranker
// - 272725719, Vectara Multilingual Reranker v1 Reranker
uint32 reranker_id = 5;

// Reranker-specific parameters. The numbering starts from 100, and moves
// upwards in increments of 5.
optional MMRConfig mmr_config = 100;

// User function that will be executed on each search result.
// May return a double or null. If this is null the item is skipped.
optional string user_function = 105;
}
RerankingConfig reranking_config = 30;

Expand Down Expand Up @@ -322,7 +334,6 @@ message Summary {
repeated Status status = 1000;
// Populated for streaming requests only.
int32 future_id = 1010;

}

// A document part that matched a query.
Expand Down
Loading