Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOpenAPISpecJSON ¶
GetOpenAPISpecJSON returns the raw OpenAPI spec as JSON bytes.
Types ¶
type BasePrompt ¶
type BasePrompt struct {
Name string `json:"name" form:"name"`
Version int `json:"version" form:"version"`
}
#/components/schemas/BasePrompt
func (*BasePrompt) ApplyDefaults ¶
func (s *BasePrompt) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type ChatMessage ¶
type ChatMessage struct {
Role string `json:"role" form:"role"`
Content string `json:"content" form:"content"`
}
#/components/schemas/ChatMessage
func (*ChatMessage) ApplyDefaults ¶
func (s *ChatMessage) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type ChatPrompt ¶
type ChatPrompt struct {
Prompt []ChatMessage `json:"prompt" form:"prompt"`
Name string `json:"name" form:"name"`
Version int `json:"version" form:"version"`
}
#/components/schemas/ChatPrompt
func (*ChatPrompt) ApplyDefaults ¶
func (s *ChatPrompt) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type ChatPromptPrompt ¶
type ChatPromptPrompt = []ChatMessage
#/components/schemas/ChatPrompt/properties/prompt
type Prompt ¶
type Prompt struct {
PromptOneOf0 *PromptOneOf0
PromptOneOf1 *PromptOneOf1
}
#/components/schemas/Prompt
func (*Prompt) ApplyDefaults ¶
func (u *Prompt) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
func (Prompt) MarshalJSON ¶
func (*Prompt) UnmarshalJSON ¶
type PromptOneOf0 ¶
type PromptOneOf0 struct {
Type *string `json:"type,omitempty" form:"type,omitempty"`
Prompt []ChatMessage `json:"prompt" form:"prompt"`
Name string `json:"name" form:"name"`
Version int `json:"version" form:"version"`
}
#/components/schemas/Prompt/oneOf/0
func (*PromptOneOf0) ApplyDefaults ¶
func (s *PromptOneOf0) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type PromptOneOf0AllOf0Type ¶
type PromptOneOf0AllOf0Type string
#/components/schemas/Prompt/oneOf/0/allOf/0/properties/type
const (
Chat PromptOneOf0AllOf0Type = "chat"
)
type PromptOneOf1 ¶
type PromptOneOf1 struct {
Type *string `json:"type,omitempty" form:"type,omitempty"`
Prompt string `json:"prompt" form:"prompt"`
Name string `json:"name" form:"name"`
Version int `json:"version" form:"version"`
}
#/components/schemas/Prompt/oneOf/1
func (*PromptOneOf1) ApplyDefaults ¶
func (s *PromptOneOf1) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.
type PromptOneOf1AllOf0Type ¶
type PromptOneOf1AllOf0Type string
#/components/schemas/Prompt/oneOf/1/allOf/0/properties/type
const (
Text PromptOneOf1AllOf0Type = "text"
)
type TextPrompt ¶
type TextPrompt struct {
Prompt string `json:"prompt" form:"prompt"`
Name string `json:"name" form:"name"`
Version int `json:"version" form:"version"`
}
#/components/schemas/TextPrompt
func (*TextPrompt) ApplyDefaults ¶
func (s *TextPrompt) ApplyDefaults()
ApplyDefaults sets default values for fields that are nil.