botpb

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ProviderType_name = map[int32]string{
		0: "Doubao",
		1: "Openai",
	}
	ProviderType_value = map[string]int32{
		"Doubao": 0,
		"Openai": 1,
	}
)

Enum value maps for ProviderType.

View Source
var (
	Message_Role_name = map[int32]string{
		0: "system",
		1: "user",
		2: "assistant",
	}
	Message_Role_value = map[string]int32{
		"system":    0,
		"user":      1,
		"assistant": 2,
	}
)

Enum value maps for Message_Role.

View Source
var (
	TypeMessage_Type_name = map[int32]string{
		0: "string",
		1: "image",
	}
	TypeMessage_Type_value = map[string]int32{
		"string": 0,
		"image":  1,
	}
)

Enum value maps for TypeMessage_Type.

Functions

This section is empty.

Types

type BotConfig

type BotConfig struct {
	Api    string `protobuf:"bytes,1,opt,name=api,proto3" json:"api,omitempty"`
	ApiKey string `protobuf:"bytes,2,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"`
	// contains filtered or unexported fields
}

func (*BotConfig) Descriptor deprecated

func (*BotConfig) Descriptor() ([]byte, []int)

Deprecated: Use BotConfig.ProtoReflect.Descriptor instead.

func (*BotConfig) GetApi

func (x *BotConfig) GetApi() string

func (*BotConfig) GetApiKey

func (x *BotConfig) GetApiKey() string

func (*BotConfig) ProtoMessage

func (*BotConfig) ProtoMessage()

func (*BotConfig) ProtoReflect

func (x *BotConfig) ProtoReflect() protoreflect.Message

func (*BotConfig) Reset

func (x *BotConfig) Reset()

func (*BotConfig) String

func (x *BotConfig) String() string

type ChatOptions

type ChatOptions struct {
	Model       string  `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
	MaxToken    int64   `protobuf:"varint,2,opt,name=max_token,json=maxToken,proto3" json:"max_token,omitempty"`
	Temperature float32 `protobuf:"fixed32,3,opt,name=temperature,proto3" json:"temperature,omitempty"`
	Stream      bool    `protobuf:"varint,4,opt,name=stream,proto3" json:"stream,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatOptions) Descriptor deprecated

func (*ChatOptions) Descriptor() ([]byte, []int)

Deprecated: Use ChatOptions.ProtoReflect.Descriptor instead.

func (*ChatOptions) GetMaxToken

func (x *ChatOptions) GetMaxToken() int64

func (*ChatOptions) GetModel

func (x *ChatOptions) GetModel() string

func (*ChatOptions) GetStream

func (x *ChatOptions) GetStream() bool

func (*ChatOptions) GetTemperature

func (x *ChatOptions) GetTemperature() float32

func (*ChatOptions) ProtoMessage

func (*ChatOptions) ProtoMessage()

func (*ChatOptions) ProtoReflect

func (x *ChatOptions) ProtoReflect() protoreflect.Message

func (*ChatOptions) Reset

func (x *ChatOptions) Reset()

func (*ChatOptions) String

func (x *ChatOptions) String() string

type ChatRequest

type ChatRequest struct {
	Messages []*Message   `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
	Options  *ChatOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatRequest) Descriptor deprecated

func (*ChatRequest) Descriptor() ([]byte, []int)

Deprecated: Use ChatRequest.ProtoReflect.Descriptor instead.

func (*ChatRequest) GetMessages

func (x *ChatRequest) GetMessages() []*Message

func (*ChatRequest) GetOptions

func (x *ChatRequest) GetOptions() *ChatOptions

func (*ChatRequest) ProtoMessage

func (*ChatRequest) ProtoMessage()

func (*ChatRequest) ProtoReflect

func (x *ChatRequest) ProtoReflect() protoreflect.Message

func (*ChatRequest) Reset

func (x *ChatRequest) Reset()

func (*ChatRequest) String

func (x *ChatRequest) String() string

type ChatResponse

type ChatResponse struct {
	Id      string    `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Choices []*Choice `protobuf:"bytes,2,rep,name=choices,proto3" json:"choices,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"`
	// contains filtered or unexported fields
}

func (*ChatResponse) Descriptor deprecated

func (*ChatResponse) Descriptor() ([]byte, []int)

Deprecated: Use ChatResponse.ProtoReflect.Descriptor instead.

func (*ChatResponse) GetChoices

func (x *ChatResponse) GetChoices() []*Choice

func (*ChatResponse) GetCreated

func (x *ChatResponse) GetCreated() int64

func (*ChatResponse) GetId

func (x *ChatResponse) GetId() string

func (*ChatResponse) GetModel

func (x *ChatResponse) GetModel() string

func (*ChatResponse) ProtoMessage

func (*ChatResponse) ProtoMessage()

func (*ChatResponse) ProtoReflect

func (x *ChatResponse) ProtoReflect() protoreflect.Message

func (*ChatResponse) Reset

func (x *ChatResponse) Reset()

func (*ChatResponse) String

func (x *ChatResponse) String() string

type Choice

type Choice struct {
	Index        int64    `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	Message      *Message `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	FinishReason string   `protobuf:"bytes,3,opt,name=finish_reason,json=finishReason,proto3" json:"finish_reason,omitempty"`
	// contains filtered or unexported fields
}

func (*Choice) Descriptor deprecated

func (*Choice) Descriptor() ([]byte, []int)

Deprecated: Use Choice.ProtoReflect.Descriptor instead.

func (*Choice) GetFinishReason

func (x *Choice) GetFinishReason() string

func (*Choice) GetIndex

func (x *Choice) GetIndex() int64

func (*Choice) GetMessage

func (x *Choice) GetMessage() *Message

func (*Choice) ProtoMessage

func (*Choice) ProtoMessage()

func (*Choice) ProtoReflect

func (x *Choice) ProtoReflect() protoreflect.Message

func (*Choice) Reset

func (x *Choice) Reset()

func (*Choice) String

func (x *Choice) String() string

type Message

type Message struct {
	Role Message_Role `protobuf:"varint,1,opt,name=role,proto3,enum=botpb.Message_Role" json:"role,omitempty"`
	// Types that are valid to be assigned to Content:
	//
	//	*Message_StringContent
	//	*Message_TypeContent
	Content isMessage_Content `protobuf_oneof:"content"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

func (*Message) Descriptor() ([]byte, []int)

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetContent

func (x *Message) GetContent() isMessage_Content

func (*Message) GetRole

func (x *Message) GetRole() Message_Role

func (*Message) GetStringContent

func (x *Message) GetStringContent() string

func (*Message) GetTypeContent

func (x *Message) GetTypeContent() *TypeMessage

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

func (x *Message) ProtoReflect() protoreflect.Message

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Message_Role

type Message_Role int32
const (
	Message_system    Message_Role = 0
	Message_user      Message_Role = 1
	Message_assistant Message_Role = 2
)

func (Message_Role) Descriptor

func (Message_Role) Enum

func (x Message_Role) Enum() *Message_Role

func (Message_Role) EnumDescriptor deprecated

func (Message_Role) EnumDescriptor() ([]byte, []int)

Deprecated: Use Message_Role.Descriptor instead.

func (Message_Role) Number

func (Message_Role) String

func (x Message_Role) String() string

func (Message_Role) Type

type Message_StringContent

type Message_StringContent struct {
	StringContent string `protobuf:"bytes,2,opt,name=string_content,json=stringContent,proto3,oneof"`
}

type Message_TypeContent

type Message_TypeContent struct {
	TypeContent *TypeMessage `protobuf:"bytes,3,opt,name=type_content,json=typeContent,proto3,oneof"`
}

type ProviderType

type ProviderType int32
const (
	ProviderType_Doubao ProviderType = 0
	ProviderType_Openai ProviderType = 1
)

func (ProviderType) Descriptor

func (ProviderType) Enum

func (x ProviderType) Enum() *ProviderType

func (ProviderType) EnumDescriptor deprecated

func (ProviderType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ProviderType.Descriptor instead.

func (ProviderType) Number

func (ProviderType) String

func (x ProviderType) String() string

func (ProviderType) Type

type StringMessage

type StringMessage struct {
	Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*StringMessage) Descriptor deprecated

func (*StringMessage) Descriptor() ([]byte, []int)

Deprecated: Use StringMessage.ProtoReflect.Descriptor instead.

func (*StringMessage) GetContent

func (x *StringMessage) GetContent() string

func (*StringMessage) ProtoMessage

func (*StringMessage) ProtoMessage()

func (*StringMessage) ProtoReflect

func (x *StringMessage) ProtoReflect() protoreflect.Message

func (*StringMessage) Reset

func (x *StringMessage) Reset()

func (*StringMessage) String

func (x *StringMessage) String() string

type TypeMessage

type TypeMessage struct {
	Type     TypeMessage_Type      `protobuf:"varint,1,opt,name=type,proto3,enum=botpb.TypeMessage_Type" json:"type,omitempty"`
	Text     string                `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	ImageUrl *TypeMessage_ImageUrl `protobuf:"bytes,3,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"`
	// contains filtered or unexported fields
}

func (*TypeMessage) Descriptor deprecated

func (*TypeMessage) Descriptor() ([]byte, []int)

Deprecated: Use TypeMessage.ProtoReflect.Descriptor instead.

func (*TypeMessage) GetImageUrl

func (x *TypeMessage) GetImageUrl() *TypeMessage_ImageUrl

func (*TypeMessage) GetText

func (x *TypeMessage) GetText() string

func (*TypeMessage) GetType

func (x *TypeMessage) GetType() TypeMessage_Type

func (*TypeMessage) ProtoMessage

func (*TypeMessage) ProtoMessage()

func (*TypeMessage) ProtoReflect

func (x *TypeMessage) ProtoReflect() protoreflect.Message

func (*TypeMessage) Reset

func (x *TypeMessage) Reset()

func (*TypeMessage) String

func (x *TypeMessage) String() string

type TypeMessage_ImageUrl

type TypeMessage_ImageUrl struct {
	Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*TypeMessage_ImageUrl) Descriptor deprecated

func (*TypeMessage_ImageUrl) Descriptor() ([]byte, []int)

Deprecated: Use TypeMessage_ImageUrl.ProtoReflect.Descriptor instead.

func (*TypeMessage_ImageUrl) GetUrl

func (x *TypeMessage_ImageUrl) GetUrl() string

func (*TypeMessage_ImageUrl) ProtoMessage

func (*TypeMessage_ImageUrl) ProtoMessage()

func (*TypeMessage_ImageUrl) ProtoReflect

func (x *TypeMessage_ImageUrl) ProtoReflect() protoreflect.Message

func (*TypeMessage_ImageUrl) Reset

func (x *TypeMessage_ImageUrl) Reset()

func (*TypeMessage_ImageUrl) String

func (x *TypeMessage_ImageUrl) String() string

type TypeMessage_Type

type TypeMessage_Type int32
const (
	TypeMessage_string TypeMessage_Type = 0
	TypeMessage_image  TypeMessage_Type = 1
)

func (TypeMessage_Type) Descriptor

func (TypeMessage_Type) Enum

func (TypeMessage_Type) EnumDescriptor deprecated

func (TypeMessage_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use TypeMessage_Type.Descriptor instead.

func (TypeMessage_Type) Number

func (TypeMessage_Type) String

func (x TypeMessage_Type) String() string

func (TypeMessage_Type) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL