Documentation
¶
Index ¶
- Variables
- type Context
- func (c *Context) Continue(prompt string) *Context
- func (c *Context) DiscardOutput() *Context
- func (c *Context) GetContent() string
- func (c *Context) SetBody(opt map[string]any) *Context
- func (c *Context) SetHeader(header *Header) *Context
- func (c *Context) SetMaxTokens(max_tokens int) *Context
- func (c *Context) SetMaxTurns(max_turns int) *Context
- func (c *Context) SetModel(model string) *Context
- func (c *Context) SetOutput(output io.Writer) *Context
- func (c *Context) SetStream() *Context
- func (c *Context) SetSystemPrompt(prompt string) *Context
- type Header
Constants ¶
This section is empty.
Variables ¶
View Source
var ( API2D_URL = "https://api.api2d.net/v1/chat/completions" API2D_STREAM_URL = "https://stream.api2d.net/v1/chat/completions" OPENAI_URL = "https://api.openai.com/v1/chat/completions" )
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func NewContext ¶
func NewContext() *Context
func (*Context) DiscardOutput ¶ added in v1.0.1
func (*Context) GetContent ¶
func (*Context) SetMaxTokens ¶ added in v1.0.1
func (*Context) SetMaxTurns ¶ added in v1.0.1
func (*Context) SetSystemPrompt ¶
Click to show internal directories.
Click to hide internal directories.