InfrastructureChatGPTAPI

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const BASE_MODEL = "gpt-3.5-turbo"
View Source
const CHATGPT_COMPLETIONS_ENDPOINT = "https://api.openai.com/v1/chat/completions"
View Source
const REQUEST_TYPE_POST = "POST"

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatGPTAPIRepository

type ChatGPTAPIRepository struct{}

func (ChatGPTAPIRepository) TranslateIntoHumanLanguage

func (api ChatGPTAPIRepository) TranslateIntoHumanLanguage(jsonMessage json.RawMessage, baseRequest Base.BaseRequest) []byte

type Messages

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

type RequestBody

type RequestBody struct {
	Model       string     `json:"model"`
	Messages    []Messages `json:"messages"`
	Temperature float32    `json:"temperature"`
	N           int        `json:"n"`
}

Jump to

Keyboard shortcuts

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