gogpt

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2023 License: MIT Imports: 8 Imported by: 1

README

gogpt

简单使用https请求openai api

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	// contains filtered or unexported fields
}

func NewContext

func NewContext() *Context

func (*Context) Continue

func (c *Context) Continue(prompt string) *Context

func (*Context) DiscardOutput added in v1.0.1

func (c *Context) DiscardOutput() *Context

func (*Context) GetContent

func (c *Context) GetContent() string

func (*Context) SetBody

func (c *Context) SetBody(opt map[string]any) *Context

func (*Context) SetHeader

func (c *Context) SetHeader(header *Header) *Context

func (*Context) SetMaxTokens added in v1.0.1

func (c *Context) SetMaxTokens(max_tokens int) *Context

func (*Context) SetMaxTurns added in v1.0.1

func (c *Context) SetMaxTurns(max_turns int) *Context

func (*Context) SetOutput added in v1.0.1

func (c *Context) SetOutput(output io.Writer) *Context

func (*Context) SetStream added in v1.0.1

func (c *Context) SetStream() *Context

func (*Context) SetSystemPrompt

func (c *Context) SetSystemPrompt(prompt string) *Context
type Header struct {
	Url  string
	Auth string
}

Jump to

Keyboard shortcuts

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