openai

package module
v0.0.0-...-d00a6bf Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

README

openai

GET OPENAI API KEY

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProxyDialer

func NewProxyDialer(network, addr string) *http.Client

Types

type Client

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

func NewClient

func NewClient(apiKey, organization string) *Client

func (*Client) Request

func (c *Client) Request(question string, dialer *http.Client) ([]byte, error)

func (*Client) Test

func (c *Client) Test(dialer *http.Client) ([]byte, error)

type Completion

type Completion struct {
	Model       string      `json:"model"`
	Messages    interface{} `json:"messages"`
	Temperature float64     `json:"temperature"`
}

type Message

type Message struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

Jump to

Keyboard shortcuts

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