replitlmclient

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func New

func New(dailTarget string, ctr container.Container) *Client

New returns a new OpenAI client.

func (*Client) RunGenerate

func (c *Client) RunGenerate(ctx context.Context, r *GenerateRequest) (*GenerateResponse, error)

type GenerateRequest

type GenerateRequest struct {
	Prompt string `json:"prompt"`
	Lang   string `json:"lang"`
}

type GenerateResponse

type GenerateResponse struct {
	CodeList         []string `json:"codeList"`
	CompletionTokens int      `json:"completionTokens"`
	PromptTokens     int      `json:"promptTokens"`
}

Jump to

Keyboard shortcuts

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