roleplay

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateResponseMessageCommand

type CreateResponseMessageCommand struct {
	AllParticipants          []Participant
	ResponseParticipantIndex int
	ResponseGpt              Gpt
	Messages                 []Message
}

type Gpt

type Gpt struct {
	Provider gpt.Provider
	Model    string
}

type Message

type Message struct {
	Content     string
	Participant Participant
}

type Participant

type Participant struct {
	Index        int
	SystemPrompt string
	Name         string
}

type Response

type Response struct {
	// A unique identifier from the gpt provider.
	ExternalID string
	// A list of response message choices. Can be more than one if n is greater than 1.
	GeneratedMessages []Message
	// The Unix timestamp (in seconds) of when the chat completion was Created.
	Created int
	// Number of tokens in the generated completion.
	Response_tokens int
	// Number of tokens in the prompt.
	Prompt_tokens int
	// Total number of tokens used in the request (prompt + completion).
	Total_tokens int
}

type Service

type Service interface {
	CreateResponseMessage(command CreateResponseMessageCommand) (*Response, error)
}

func NewService

func NewService(providers []gpt.Auth) Service

Jump to

Keyboard shortcuts

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