# Functions
AssistantMessage represents a message with Role "assistant".
ConcatMessages concat messages with the same role and name.
MergeStreamReaders merge multiple StreamReader into one.
MessagesPlaceholder can render a placeholder to a list of messages in params.
NewMessageJSONParser creates a new MessageJSONParser.
NewParamsOneOfByOpenAPIV3 creates a ParamsOneOf with *openapi3.Schema.
NewParamsOneOfByParams creates a ParamsOneOf with map[string]*ParameterInfo.
Pipe creates a new stream with the given capacity that represented with StreamWriter and StreamReader.
StreamReaderFromArray creates a StreamReader from a given slice of elements.
StreamReaderWithConvert converts the stream reader to another stream reader.
SystemMessage represents a message with Role "system".
ToolMessage represents a message with Role "tool".
UserMessage represents a message with Role "user".
# Constants
No description provided by the author
Assistant is the role of an assistant, means the message is returned by ChatModel.
No description provided by the author
ChatMessagePartTypeAudioURL means the part is an audio url.
ChatMessagePartTypeFileURL means the part is a file url.
ChatMessagePartTypeImageURL means the part is an image url.
ChatMessagePartTypeText means the part is a text.
ChatMessagePartTypeVideoURL means the part is a video url.
FString Supported by pyfmt(github.com/slongfield/pyfmt), which is an implementation of https://peps.python.org/pep-3101/.
GoTemplate https://pkg.go.dev/text/template.
ImageURLDetailAuto means the auto quality image url.
ImageURLDetailHigh means the high quality image url.
ImageURLDetailLow means the low quality image url.
No description provided by the author
Jinja2 Supported by gonja(github.com/nikolalohinski/gonja), which is a implementation of https://jinja.palletsprojects.com/en/3.1.x/templates/.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
System is the role of a system, means the message is a system message.
Tool is the role of a tool, means the message is a tool call output.
ToolChoiceAllowed indicates that the model can choose to generate a message or call one or more tools.
ToolChoiceForbidden indicates that the model should not call any tools.
ToolChoiceForced indicates that the model must call one or more tools.
User is the role of a user, means the message is a user message.
# Variables
ErrNoValue is used during StreamReaderWithConvert to skip a streamItem, excluding it from the converted stream.
# Structs
ChatMessageAudioURL is used to represent an audio part in a chat message.
ChatMessageFileURL is used to represent an file part in a chat message.
ChatMessageImageURL is used to represent an image part in a chat message.
ChatMessagePart is the part in a chat message.
ChatMessageVideoURL is used to represent an video part in a chat message.
Document is a piece of text with metadata.
FunctionCall is the function call in a message.
No description provided by the author
No description provided by the author
MessageJSONParser is a parser that parses a message into an object T, using json unmarshal.
ParameterInfo is the information of a parameter.
ParamsOneOf is a union of the different methods user can choose which describe a tool's request parameters.
ResponseMeta collects meta information about a chat response.
StreamReader the receiver of a stream.
StreamWriter the sender of a stream.
TokenUsage Represents the token usage of chat model request.
ToolCall is the tool call in a message.
ToolInfo is the information of a tool.
# Interfaces
No description provided by the author
MessagesTemplate is the interface for messages template.
# Type aliases
ChatMessagePartType is the type of the part in a chat message.
DataType is the type of the parameter.
FormatType used by MessageTemplate.Format.
ImageURLDetail is the detail of the image url.
MessageParseFrom determines the source of the data to be parsed.
RoleType is the type of the role of a message.
ToolChoice controls how the model calls tools (if any).