Documentation
¶
Index ¶
Constants ¶
View Source
const ( PropertyKeyIsDone = "isDone" PropertyKeyGameState = "gameMasterStatement" FunctionCallNameGetStoryState = "get_story_state" )
Variables ¶
This section is empty.
Functions ¶
func NewGameBuilder ¶
func NewGameBuilder() *gameBuilder
Types ¶
type Character ¶
type Character struct {
Name string
MeRelation string
Personality string
Context string
Variables map[string]any
}
func (*Character) PromptString ¶
type GMPhase ¶
type GMPhase struct {
Text string
FunctionCall *openai.FunctionCall
}
func (*GMPhase) ToMessage ¶
func (g *GMPhase) ToMessage() openai.ChatCompletionMessage
type Game ¶
type Game struct {
IsDone bool
// contains filtered or unexported fields
}
func (*Game) GetStories ¶
type ParameterKey ¶
type ParameterKey struct {
Name string
Description string
Type ParameterType
}
type ParameterType ¶
type ParameterType string
const ( PropertyTypeString ParameterType = "string" PropertyTypeNumber ParameterType = "number" PropertyTypeBoolean ParameterType = "boolean" PropertyTypeListString ParameterType = "listString" PropertyTypeListNumber ParameterType = "listNumber" )
type Result ¶
type Result interface {
ToMessage() openai.ChatCompletionMessage
ToText() string
}
type Story ¶
type Story struct {
Result Result
Properties map[ParameterKey]any
}
Click to show internal directories.
Click to hide internal directories.