faiss server
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.28.1
|
||||
// protoc v4.22.0
|
||||
// protoc-gen-go v1.36.6
|
||||
// protoc v3.6.1
|
||||
// source: proto/chat.proto
|
||||
|
||||
package proto
|
||||
|
||||
import (
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -22,24 +22,21 @@ const (
|
||||
)
|
||||
|
||||
type ChatCompletionRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Pid string `protobuf:"bytes,3,opt,name=pid,json=p_id,proto3" json:"pid,omitempty"`
|
||||
EnableContext bool `protobuf:"varint,4,opt,name=enableContext,json=enable_context,proto3" json:"enableContext,omitempty"`
|
||||
ChatParam *ChatParam `protobuf:"bytes,5,opt,name=chatParam,json=chat_param,proto3" json:"chatParam,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Pid string `protobuf:"bytes,3,opt,name=pid,json=p_id,proto3" json:"pid,omitempty"`
|
||||
EnableContext bool `protobuf:"varint,4,opt,name=enableContext,json=enable_context,proto3" json:"enableContext,omitempty"`
|
||||
ChatParam *ChatParam `protobuf:"bytes,5,opt,name=chatParam,json=chat_param,proto3" json:"chatParam,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ChatCompletionRequest) Reset() {
|
||||
*x = ChatCompletionRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_chat_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_proto_chat_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ChatCompletionRequest) String() string {
|
||||
@@ -50,7 +47,7 @@ func (*ChatCompletionRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ChatCompletionRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_chat_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -101,29 +98,26 @@ func (x *ChatCompletionRequest) GetChatParam() *ChatParam {
|
||||
}
|
||||
|
||||
type ChatParam struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
|
||||
MaxTokens int32 `protobuf:"varint,2,opt,name=maxTokens,json=max_tokens,proto3" json:"maxTokens,omitempty"`
|
||||
Temperature float32 `protobuf:"fixed32,3,opt,name=temperature,proto3" json:"temperature,omitempty"`
|
||||
TopP float32 `protobuf:"fixed32,4,opt,name=topP,json=top_p,proto3" json:"topP,omitempty"`
|
||||
PresencePenalty float32 `protobuf:"fixed32,5,opt,name=presencePenalty,json=presence_penalty,proto3" json:"presencePenalty,omitempty"`
|
||||
FrequencyPenalty float32 `protobuf:"fixed32,6,opt,name=frequencyPenalty,json=frequency_penalty,proto3" json:"frequencyPenalty,omitempty"`
|
||||
BotDesc string `protobuf:"bytes,7,opt,name=botDesc,json=bot_desc,proto3" json:"botDesc,omitempty"`
|
||||
MinResponseTokens int32 `protobuf:"varint,8,opt,name=minResponseTokens,json=min_response_tokens,proto3" json:"minResponseTokens,omitempty"`
|
||||
ContextTTL int32 `protobuf:"varint,9,opt,name=contextTTL,json=context_ttl,proto3" json:"contextTTL,omitempty"`
|
||||
ContextLen int32 `protobuf:"varint,10,opt,name=contextLen,json=context_len,proto3" json:"contextLen,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
|
||||
MaxTokens int32 `protobuf:"varint,2,opt,name=maxTokens,json=max_tokens,proto3" json:"maxTokens,omitempty"`
|
||||
Temperature float32 `protobuf:"fixed32,3,opt,name=temperature,proto3" json:"temperature,omitempty"`
|
||||
TopP float32 `protobuf:"fixed32,4,opt,name=topP,json=top_p,proto3" json:"topP,omitempty"`
|
||||
PresencePenalty float32 `protobuf:"fixed32,5,opt,name=presencePenalty,json=presence_penalty,proto3" json:"presencePenalty,omitempty"`
|
||||
FrequencyPenalty float32 `protobuf:"fixed32,6,opt,name=frequencyPenalty,json=frequency_penalty,proto3" json:"frequencyPenalty,omitempty"`
|
||||
BotDesc string `protobuf:"bytes,7,opt,name=botDesc,json=bot_desc,proto3" json:"botDesc,omitempty"`
|
||||
MinResponseTokens int32 `protobuf:"varint,8,opt,name=minResponseTokens,json=min_response_tokens,proto3" json:"minResponseTokens,omitempty"`
|
||||
ContextTTL int32 `protobuf:"varint,9,opt,name=contextTTL,json=context_ttl,proto3" json:"contextTTL,omitempty"`
|
||||
ContextLen int32 `protobuf:"varint,10,opt,name=contextLen,json=context_len,proto3" json:"contextLen,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ChatParam) Reset() {
|
||||
*x = ChatParam{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_chat_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_proto_chat_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ChatParam) String() string {
|
||||
@@ -134,7 +128,7 @@ func (*ChatParam) ProtoMessage() {}
|
||||
|
||||
func (x *ChatParam) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_chat_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -221,25 +215,23 @@ func (x *ChatParam) GetContextLen() int32 {
|
||||
|
||||
// 服务响应消息,非流式响应
|
||||
type ChatCompletionResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
|
||||
Created int64 `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"`
|
||||
Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"`
|
||||
Choices []*ChatCompletionChoice `protobuf:"bytes,5,rep,name=choices,proto3" json:"choices,omitempty"`
|
||||
Usage *Usage `protobuf:"bytes,6,opt,name=usage,proto3" json:"usage,omitempty"`
|
||||
Source string `protobuf:"bytes,7,opt,name=source,proto3" json:"source,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
|
||||
Created int64 `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"`
|
||||
Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"`
|
||||
Choices []*ChatCompletionChoice `protobuf:"bytes,5,rep,name=choices,proto3" json:"choices,omitempty"`
|
||||
Usage *Usage `protobuf:"bytes,6,opt,name=usage,proto3" json:"usage,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ChatCompletionResponse) Reset() {
|
||||
*x = ChatCompletionResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_chat_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_proto_chat_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ChatCompletionResponse) String() string {
|
||||
@@ -250,7 +242,7 @@ func (*ChatCompletionResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ChatCompletionResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_chat_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -307,23 +299,27 @@ func (x *ChatCompletionResponse) GetUsage() *Usage {
|
||||
return nil
|
||||
}
|
||||
|
||||
type ChatCompletionChoice struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
func (x *ChatCompletionResponse) GetSource() string {
|
||||
if x != nil {
|
||||
return x.Source
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
|
||||
Message *ChatCompletionMessage `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||
FinishReason string `protobuf:"bytes,3,opt,name=finishReason,json=finish_reason,proto3" json:"finishReason,omitempty"`
|
||||
type ChatCompletionChoice struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
|
||||
Message *ChatCompletionMessage `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
|
||||
FinishReason string `protobuf:"bytes,3,opt,name=finishReason,json=finish_reason,proto3" json:"finishReason,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ChatCompletionChoice) Reset() {
|
||||
*x = ChatCompletionChoice{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_chat_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_proto_chat_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ChatCompletionChoice) String() string {
|
||||
@@ -334,7 +330,7 @@ func (*ChatCompletionChoice) ProtoMessage() {}
|
||||
|
||||
func (x *ChatCompletionChoice) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_chat_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -371,22 +367,19 @@ func (x *ChatCompletionChoice) GetFinishReason() string {
|
||||
}
|
||||
|
||||
type ChatCompletionMessage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
|
||||
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
|
||||
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ChatCompletionMessage) Reset() {
|
||||
*x = ChatCompletionMessage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_chat_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_proto_chat_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ChatCompletionMessage) String() string {
|
||||
@@ -397,7 +390,7 @@ func (*ChatCompletionMessage) ProtoMessage() {}
|
||||
|
||||
func (x *ChatCompletionMessage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_chat_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -434,22 +427,19 @@ func (x *ChatCompletionMessage) GetName() string {
|
||||
}
|
||||
|
||||
type Usage struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
PromptTokens int32 `protobuf:"varint,1,opt,name=promptTokens,json=prompt_tokens,proto3" json:"promptTokens,omitempty"`
|
||||
CompletionTokens int32 `protobuf:"varint,2,opt,name=completionTokens,json=completion_tokens,proto3" json:"completionTokens,omitempty"`
|
||||
TotalTokens int32 `protobuf:"varint,3,opt,name=totalTokens,json=total_tokens,proto3" json:"totalTokens,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
PromptTokens int32 `protobuf:"varint,1,opt,name=promptTokens,json=prompt_tokens,proto3" json:"promptTokens,omitempty"`
|
||||
CompletionTokens int32 `protobuf:"varint,2,opt,name=completionTokens,json=completion_tokens,proto3" json:"completionTokens,omitempty"`
|
||||
TotalTokens int32 `protobuf:"varint,3,opt,name=totalTokens,json=total_tokens,proto3" json:"totalTokens,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *Usage) Reset() {
|
||||
*x = Usage{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_chat_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_proto_chat_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Usage) String() string {
|
||||
@@ -460,7 +450,7 @@ func (*Usage) ProtoMessage() {}
|
||||
|
||||
func (x *Usage) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_chat_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -498,24 +488,23 @@ func (x *Usage) GetTotalTokens() int32 {
|
||||
|
||||
// 服务响应消息,流式响应
|
||||
type ChatCompletionStreamResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
|
||||
Created int64 `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"`
|
||||
Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"`
|
||||
Choices []*ChatCompletionStreamChoice `protobuf:"bytes,5,rep,name=choices,proto3" json:"choices,omitempty"`
|
||||
Usage *Usage `protobuf:"bytes,6,opt,name=usage,proto3" json:"usage,omitempty"`
|
||||
Source string `protobuf:"bytes,7,opt,name=source,proto3" json:"source,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Object string `protobuf:"bytes,2,opt,name=object,proto3" json:"object,omitempty"`
|
||||
Created int64 `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"`
|
||||
Model string `protobuf:"bytes,4,opt,name=model,proto3" json:"model,omitempty"`
|
||||
Choices []*ChatCompletionStreamChoice `protobuf:"bytes,5,rep,name=choices,proto3" json:"choices,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ChatCompletionStreamResponse) Reset() {
|
||||
*x = ChatCompletionStreamResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_chat_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_proto_chat_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ChatCompletionStreamResponse) String() string {
|
||||
@@ -526,7 +515,7 @@ func (*ChatCompletionStreamResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ChatCompletionStreamResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_chat_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -576,23 +565,34 @@ func (x *ChatCompletionStreamResponse) GetChoices() []*ChatCompletionStreamChoic
|
||||
return nil
|
||||
}
|
||||
|
||||
type ChatCompletionStreamChoice struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
func (x *ChatCompletionStreamResponse) GetUsage() *Usage {
|
||||
if x != nil {
|
||||
return x.Usage
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
|
||||
Delta *ChatCompletionStreamChoiceDelta `protobuf:"bytes,2,opt,name=delta,proto3" json:"delta,omitempty"`
|
||||
FinishReason string `protobuf:"bytes,3,opt,name=finishReason,json=finish_reason,proto3" json:"finishReason,omitempty"`
|
||||
func (x *ChatCompletionStreamResponse) GetSource() string {
|
||||
if x != nil {
|
||||
return x.Source
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type ChatCompletionStreamChoice struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
|
||||
Delta *ChatCompletionStreamChoiceDelta `protobuf:"bytes,2,opt,name=delta,proto3" json:"delta,omitempty"`
|
||||
FinishReason string `protobuf:"bytes,3,opt,name=finishReason,json=finish_reason,proto3" json:"finishReason,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ChatCompletionStreamChoice) Reset() {
|
||||
*x = ChatCompletionStreamChoice{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_chat_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_proto_chat_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ChatCompletionStreamChoice) String() string {
|
||||
@@ -603,7 +603,7 @@ func (*ChatCompletionStreamChoice) ProtoMessage() {}
|
||||
|
||||
func (x *ChatCompletionStreamChoice) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_chat_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -640,21 +640,18 @@ func (x *ChatCompletionStreamChoice) GetFinishReason() string {
|
||||
}
|
||||
|
||||
type ChatCompletionStreamChoiceDelta struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
|
||||
Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
|
||||
Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *ChatCompletionStreamChoiceDelta) Reset() {
|
||||
*x = ChatCompletionStreamChoiceDelta{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_proto_chat_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_proto_chat_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ChatCompletionStreamChoiceDelta) String() string {
|
||||
@@ -665,7 +662,7 @@ func (*ChatCompletionStreamChoiceDelta) ProtoMessage() {}
|
||||
|
||||
func (x *ChatCompletionStreamChoiceDelta) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_proto_chat_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@@ -696,147 +693,84 @@ func (x *ChatCompletionStreamChoiceDelta) GetRole() string {
|
||||
|
||||
var File_proto_chat_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_proto_chat_proto_rawDesc = []byte{
|
||||
0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x12, 0x1a, 0x61, 0x69, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76,
|
||||
0x69, 0x63, 0x65, 0x2e, 0x7a, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x22, 0xc1,
|
||||
0x01, 0x0a, 0x15, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
|
||||
0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
|
||||
0x69, 0x64, 0x12, 0x11, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x70, 0x5f, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x43,
|
||||
0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x6e,
|
||||
0x61, 0x62, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x44, 0x0a, 0x09,
|
||||
0x63, 0x68, 0x61, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x25, 0x2e, 0x61, 0x69, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x2e, 0x7a, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x43, 0x68, 0x61,
|
||||
0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x0a, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x70, 0x61, 0x72,
|
||||
0x61, 0x6d, 0x22, 0xdc, 0x02, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x1d, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x54, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x6d, 0x61, 0x78, 0x5f, 0x74,
|
||||
0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x65, 0x72, 0x61,
|
||||
0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0b, 0x74, 0x65, 0x6d, 0x70,
|
||||
0x65, 0x72, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x13, 0x0a, 0x04, 0x74, 0x6f, 0x70, 0x50, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x74, 0x6f, 0x70, 0x5f, 0x70, 0x12, 0x29, 0x0a, 0x0f,
|
||||
0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x18,
|
||||
0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x10, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x5f,
|
||||
0x70, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x12, 0x2b, 0x0a, 0x10, 0x66, 0x72, 0x65, 0x71, 0x75,
|
||||
0x65, 0x6e, 0x63, 0x79, 0x50, 0x65, 0x6e, 0x61, 0x6c, 0x74, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x02, 0x52, 0x11, 0x66, 0x72, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x70, 0x65, 0x6e,
|
||||
0x61, 0x6c, 0x74, 0x79, 0x12, 0x19, 0x0a, 0x07, 0x62, 0x6f, 0x74, 0x44, 0x65, 0x73, 0x63, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x62, 0x6f, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x12,
|
||||
0x2e, 0x0a, 0x11, 0x6d, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x6f,
|
||||
0x6b, 0x65, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x13, 0x6d, 0x69, 0x6e, 0x5f,
|
||||
0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12,
|
||||
0x1f, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x54, 0x54, 0x4c, 0x18, 0x09, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x74, 0x74, 0x6c,
|
||||
0x12, 0x1f, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x4c, 0x65, 0x6e, 0x18, 0x0a,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x5f, 0x6c, 0x65,
|
||||
0x6e, 0x22, 0xf5, 0x01, 0x0a, 0x16, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62,
|
||||
0x6a, 0x65, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d,
|
||||
0x6f, 0x64, 0x65, 0x6c, 0x12, 0x4a, 0x0a, 0x07, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x18,
|
||||
0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x61, 0x69, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x5f,
|
||||
0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x7a, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x07, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73,
|
||||
0x12, 0x37, 0x0a, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x21, 0x2e, 0x61, 0x69, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||
0x65, 0x2e, 0x7a, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x55, 0x73, 0x61,
|
||||
0x67, 0x65, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x14, 0x43, 0x68,
|
||||
0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x6f, 0x69,
|
||||
0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x4b, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x61, 0x69, 0x5f, 0x63,
|
||||
0x68, 0x61, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x7a, 0x76, 0x6f, 0x69,
|
||||
0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c,
|
||||
0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65,
|
||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68, 0x52,
|
||||
0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x69, 0x6e,
|
||||
0x69, 0x73, 0x68, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x59, 0x0a, 0x15, 0x43, 0x68,
|
||||
0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73,
|
||||
0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
|
||||
0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||||
0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x7c, 0x0a, 0x05, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23,
|
||||
0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x5f, 0x74, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x11, 0x63,
|
||||
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73,
|
||||
0x12, 0x21, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x74, 0x6f, 0x6b,
|
||||
0x65, 0x6e, 0x73, 0x22, 0xc8, 0x01, 0x0a, 0x1c, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70,
|
||||
0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x50, 0x0a, 0x07,
|
||||
0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x36, 0x2e,
|
||||
0x61, 0x69, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e,
|
||||
0x7a, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43,
|
||||
0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43,
|
||||
0x68, 0x6f, 0x69, 0x63, 0x65, 0x52, 0x07, 0x63, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x73, 0x22, 0xaa,
|
||||
0x01, 0x0a, 0x1a, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x14, 0x0a,
|
||||
0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e,
|
||||
0x64, 0x65, 0x78, 0x12, 0x51, 0x0a, 0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x3b, 0x2e, 0x61, 0x69, 0x5f, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x73, 0x65, 0x72,
|
||||
0x76, 0x69, 0x63, 0x65, 0x2e, 0x7a, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2e,
|
||||
0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74,
|
||||
0x72, 0x65, 0x61, 0x6d, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x52,
|
||||
0x05, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x23, 0x0a, 0x0c, 0x66, 0x69, 0x6e, 0x69, 0x73, 0x68,
|
||||
0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x66, 0x69,
|
||||
0x6e, 0x69, 0x73, 0x68, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x4f, 0x0a, 0x1f, 0x43,
|
||||
0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72,
|
||||
0x65, 0x61, 0x6d, 0x43, 0x68, 0x6f, 0x69, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x32, 0x87, 0x02, 0x0a,
|
||||
0x04, 0x43, 0x68, 0x61, 0x74, 0x12, 0x77, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d,
|
||||
0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x2e, 0x61, 0x69, 0x5f, 0x63, 0x68, 0x61,
|
||||
0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x7a, 0x76, 0x6f, 0x69, 0x63, 0x65,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x61, 0x69, 0x5f,
|
||||
0x63, 0x68, 0x61, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x7a, 0x76, 0x6f,
|
||||
0x69, 0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70,
|
||||
0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85,
|
||||
0x01, 0x0a, 0x14, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x12, 0x31, 0x2e, 0x61, 0x69, 0x5f, 0x63, 0x68, 0x61,
|
||||
0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x7a, 0x76, 0x6f, 0x69, 0x63, 0x65,
|
||||
0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x61, 0x69, 0x5f,
|
||||
0x63, 0x68, 0x61, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x7a, 0x76, 0x6f,
|
||||
0x69, 0x63, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43, 0x6f, 0x6d, 0x70,
|
||||
0x6c, 0x65, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x17, 0x5a, 0x15, 0x61, 0x69, 0x2d, 0x63, 0x68, 0x61,
|
||||
0x74, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
const file_proto_chat_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x10proto/chat.proto\x12\x1aai_chat_service.zvoice.com\"\xc1\x01\n" +
|
||||
"\x15ChatCompletionRequest\x12\x18\n" +
|
||||
"\amessage\x18\x01 \x01(\tR\amessage\x12\x0e\n" +
|
||||
"\x02id\x18\x02 \x01(\tR\x02id\x12\x11\n" +
|
||||
"\x03pid\x18\x03 \x01(\tR\x04p_id\x12%\n" +
|
||||
"\renableContext\x18\x04 \x01(\bR\x0eenable_context\x12D\n" +
|
||||
"\tchatParam\x18\x05 \x01(\v2%.ai_chat_service.zvoice.com.ChatParamR\n" +
|
||||
"chat_param\"\xdc\x02\n" +
|
||||
"\tChatParam\x12\x14\n" +
|
||||
"\x05model\x18\x01 \x01(\tR\x05model\x12\x1d\n" +
|
||||
"\tmaxTokens\x18\x02 \x01(\x05R\n" +
|
||||
"max_tokens\x12 \n" +
|
||||
"\vtemperature\x18\x03 \x01(\x02R\vtemperature\x12\x13\n" +
|
||||
"\x04topP\x18\x04 \x01(\x02R\x05top_p\x12)\n" +
|
||||
"\x0fpresencePenalty\x18\x05 \x01(\x02R\x10presence_penalty\x12+\n" +
|
||||
"\x10frequencyPenalty\x18\x06 \x01(\x02R\x11frequency_penalty\x12\x19\n" +
|
||||
"\abotDesc\x18\a \x01(\tR\bbot_desc\x12.\n" +
|
||||
"\x11minResponseTokens\x18\b \x01(\x05R\x13min_response_tokens\x12\x1f\n" +
|
||||
"\n" +
|
||||
"contextTTL\x18\t \x01(\x05R\vcontext_ttl\x12\x1f\n" +
|
||||
"\n" +
|
||||
"contextLen\x18\n" +
|
||||
" \x01(\x05R\vcontext_len\"\x8d\x02\n" +
|
||||
"\x16ChatCompletionResponse\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" +
|
||||
"\x06object\x18\x02 \x01(\tR\x06object\x12\x18\n" +
|
||||
"\acreated\x18\x03 \x01(\x03R\acreated\x12\x14\n" +
|
||||
"\x05model\x18\x04 \x01(\tR\x05model\x12J\n" +
|
||||
"\achoices\x18\x05 \x03(\v20.ai_chat_service.zvoice.com.ChatCompletionChoiceR\achoices\x127\n" +
|
||||
"\x05usage\x18\x06 \x01(\v2!.ai_chat_service.zvoice.com.UsageR\x05usage\x12\x16\n" +
|
||||
"\x06source\x18\a \x01(\tR\x06source\"\x9e\x01\n" +
|
||||
"\x14ChatCompletionChoice\x12\x14\n" +
|
||||
"\x05index\x18\x01 \x01(\x05R\x05index\x12K\n" +
|
||||
"\amessage\x18\x02 \x01(\v21.ai_chat_service.zvoice.com.ChatCompletionMessageR\amessage\x12#\n" +
|
||||
"\ffinishReason\x18\x03 \x01(\tR\rfinish_reason\"Y\n" +
|
||||
"\x15ChatCompletionMessage\x12\x12\n" +
|
||||
"\x04role\x18\x01 \x01(\tR\x04role\x12\x18\n" +
|
||||
"\acontent\x18\x02 \x01(\tR\acontent\x12\x12\n" +
|
||||
"\x04name\x18\x03 \x01(\tR\x04name\"|\n" +
|
||||
"\x05Usage\x12#\n" +
|
||||
"\fpromptTokens\x18\x01 \x01(\x05R\rprompt_tokens\x12+\n" +
|
||||
"\x10completionTokens\x18\x02 \x01(\x05R\x11completion_tokens\x12!\n" +
|
||||
"\vtotalTokens\x18\x03 \x01(\x05R\ftotal_tokens\"\x99\x02\n" +
|
||||
"\x1cChatCompletionStreamResponse\x12\x0e\n" +
|
||||
"\x02id\x18\x01 \x01(\tR\x02id\x12\x16\n" +
|
||||
"\x06object\x18\x02 \x01(\tR\x06object\x12\x18\n" +
|
||||
"\acreated\x18\x03 \x01(\x03R\acreated\x12\x14\n" +
|
||||
"\x05model\x18\x04 \x01(\tR\x05model\x12P\n" +
|
||||
"\achoices\x18\x05 \x03(\v26.ai_chat_service.zvoice.com.ChatCompletionStreamChoiceR\achoices\x127\n" +
|
||||
"\x05usage\x18\x06 \x01(\v2!.ai_chat_service.zvoice.com.UsageR\x05usage\x12\x16\n" +
|
||||
"\x06source\x18\a \x01(\tR\x06source\"\xaa\x01\n" +
|
||||
"\x1aChatCompletionStreamChoice\x12\x14\n" +
|
||||
"\x05index\x18\x01 \x01(\x05R\x05index\x12Q\n" +
|
||||
"\x05delta\x18\x02 \x01(\v2;.ai_chat_service.zvoice.com.ChatCompletionStreamChoiceDeltaR\x05delta\x12#\n" +
|
||||
"\ffinishReason\x18\x03 \x01(\tR\rfinish_reason\"O\n" +
|
||||
"\x1fChatCompletionStreamChoiceDelta\x12\x18\n" +
|
||||
"\acontent\x18\x01 \x01(\tR\acontent\x12\x12\n" +
|
||||
"\x04role\x18\x02 \x01(\tR\x04role2\x87\x02\n" +
|
||||
"\x04Chat\x12w\n" +
|
||||
"\x0eChatCompletion\x121.ai_chat_service.zvoice.com.ChatCompletionRequest\x1a2.ai_chat_service.zvoice.com.ChatCompletionResponse\x12\x85\x01\n" +
|
||||
"\x14ChatCompletionStream\x121.ai_chat_service.zvoice.com.ChatCompletionRequest\x1a8.ai_chat_service.zvoice.com.ChatCompletionStreamResponse0\x01B\x17Z\x15ai-chat-service/protob\x06proto3"
|
||||
|
||||
var (
|
||||
file_proto_chat_proto_rawDescOnce sync.Once
|
||||
file_proto_chat_proto_rawDescData = file_proto_chat_proto_rawDesc
|
||||
file_proto_chat_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_proto_chat_proto_rawDescGZIP() []byte {
|
||||
file_proto_chat_proto_rawDescOnce.Do(func() {
|
||||
file_proto_chat_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_chat_proto_rawDescData)
|
||||
file_proto_chat_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_chat_proto_rawDesc), len(file_proto_chat_proto_rawDesc)))
|
||||
})
|
||||
return file_proto_chat_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_proto_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
|
||||
var file_proto_chat_proto_goTypes = []interface{}{
|
||||
var file_proto_chat_proto_goTypes = []any{
|
||||
(*ChatCompletionRequest)(nil), // 0: ai_chat_service.zvoice.com.ChatCompletionRequest
|
||||
(*ChatParam)(nil), // 1: ai_chat_service.zvoice.com.ChatParam
|
||||
(*ChatCompletionResponse)(nil), // 2: ai_chat_service.zvoice.com.ChatCompletionResponse
|
||||
@@ -853,16 +787,17 @@ var file_proto_chat_proto_depIdxs = []int32{
|
||||
5, // 2: ai_chat_service.zvoice.com.ChatCompletionResponse.usage:type_name -> ai_chat_service.zvoice.com.Usage
|
||||
4, // 3: ai_chat_service.zvoice.com.ChatCompletionChoice.message:type_name -> ai_chat_service.zvoice.com.ChatCompletionMessage
|
||||
7, // 4: ai_chat_service.zvoice.com.ChatCompletionStreamResponse.choices:type_name -> ai_chat_service.zvoice.com.ChatCompletionStreamChoice
|
||||
8, // 5: ai_chat_service.zvoice.com.ChatCompletionStreamChoice.delta:type_name -> ai_chat_service.zvoice.com.ChatCompletionStreamChoiceDelta
|
||||
0, // 6: ai_chat_service.zvoice.com.Chat.ChatCompletion:input_type -> ai_chat_service.zvoice.com.ChatCompletionRequest
|
||||
0, // 7: ai_chat_service.zvoice.com.Chat.ChatCompletionStream:input_type -> ai_chat_service.zvoice.com.ChatCompletionRequest
|
||||
2, // 8: ai_chat_service.zvoice.com.Chat.ChatCompletion:output_type -> ai_chat_service.zvoice.com.ChatCompletionResponse
|
||||
6, // 9: ai_chat_service.zvoice.com.Chat.ChatCompletionStream:output_type -> ai_chat_service.zvoice.com.ChatCompletionStreamResponse
|
||||
8, // [8:10] is the sub-list for method output_type
|
||||
6, // [6:8] is the sub-list for method input_type
|
||||
6, // [6:6] is the sub-list for extension type_name
|
||||
6, // [6:6] is the sub-list for extension extendee
|
||||
0, // [0:6] is the sub-list for field type_name
|
||||
5, // 5: ai_chat_service.zvoice.com.ChatCompletionStreamResponse.usage:type_name -> ai_chat_service.zvoice.com.Usage
|
||||
8, // 6: ai_chat_service.zvoice.com.ChatCompletionStreamChoice.delta:type_name -> ai_chat_service.zvoice.com.ChatCompletionStreamChoiceDelta
|
||||
0, // 7: ai_chat_service.zvoice.com.Chat.ChatCompletion:input_type -> ai_chat_service.zvoice.com.ChatCompletionRequest
|
||||
0, // 8: ai_chat_service.zvoice.com.Chat.ChatCompletionStream:input_type -> ai_chat_service.zvoice.com.ChatCompletionRequest
|
||||
2, // 9: ai_chat_service.zvoice.com.Chat.ChatCompletion:output_type -> ai_chat_service.zvoice.com.ChatCompletionResponse
|
||||
6, // 10: ai_chat_service.zvoice.com.Chat.ChatCompletionStream:output_type -> ai_chat_service.zvoice.com.ChatCompletionStreamResponse
|
||||
9, // [9:11] is the sub-list for method output_type
|
||||
7, // [7:9] is the sub-list for method input_type
|
||||
7, // [7:7] is the sub-list for extension type_name
|
||||
7, // [7:7] is the sub-list for extension extendee
|
||||
0, // [0:7] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_proto_chat_proto_init() }
|
||||
@@ -870,121 +805,11 @@ func file_proto_chat_proto_init() {
|
||||
if File_proto_chat_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_proto_chat_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatCompletionRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_chat_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatParam); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_chat_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatCompletionResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_chat_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatCompletionChoice); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_chat_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatCompletionMessage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_chat_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Usage); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_chat_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatCompletionStreamResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_chat_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatCompletionStreamChoice); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_proto_chat_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ChatCompletionStreamChoiceDelta); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_proto_chat_proto_rawDesc,
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_chat_proto_rawDesc), len(file_proto_chat_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 9,
|
||||
NumExtensions: 0,
|
||||
@@ -995,7 +820,6 @@ func file_proto_chat_proto_init() {
|
||||
MessageInfos: file_proto_chat_proto_msgTypes,
|
||||
}.Build()
|
||||
File_proto_chat_proto = out.File
|
||||
file_proto_chat_proto_rawDesc = nil
|
||||
file_proto_chat_proto_goTypes = nil
|
||||
file_proto_chat_proto_depIdxs = nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user