Versions in this module Expand all Collapse all v1 v1.1.0 Apr 6, 2021 Changes in this version + const GinContextKey + const PlaygroundEndpoint + const QueryEndpoint + var AllActionKind = []ActionKind + var Engine *types.Engine + func GinContextFromContext(ctx context.Context) (*gin.Context, error) + func GinContextToContextMiddleware() gin.HandlerFunc + func IsGetFailError(err error) bool + func IsTypeError(err error) bool + func NewExecutableSchema(cfg Config) graphql.ExecutableSchema + func PlaygroundHandler() gin.HandlerFunc + func QueryHandler() gin.HandlerFunc + type Action struct + ID uid.ID + Kind ActionKind + Label string + type ActionKind string + const ActionKindConversationEnd + const ActionKindTopicChange + func (e *ActionKind) UnmarshalGQL(v interface{}) error + func (e ActionKind) IsValid() bool + func (e ActionKind) MarshalGQL(w io.Writer) + func (e ActionKind) String() string + type AuthInput struct + ID uid.ID + Jwt string + type Character struct + Anonymous bool + ID uid.ID + Name string + Type types.CharacterType + type ComplexityRoot struct + Action struct{ ... } + Character struct{ ... } + Conversation struct{ ... } + ConversationMeta struct{ ... } + Gpt3 struct{ ... } + InfoPair struct{ ... } + Message struct{ ... } + Mutation struct{ ... } + Query struct{ ... } + Scenario struct{ ... } + ScenarioMeta struct{ ... } + ServerMeta struct{ ... } + User struct{ ... } + type Config struct + Complexity ComplexityRoot + Directives DirectiveRoot + Resolvers ResolverRoot + type Conversation struct + Actions []*Action + Characters []*Character + Gpt3 *types.GPT3 + ID uid.ID + Messages []*types.Msg + Meta *ConversationMeta + Scenario *Scenario + Status *string + type ConversationMeta struct + Active bool + Engine string + Started time.Time + Timeout string + User uid.ID + type DirectiveRoot struct + type GPT3Resolver interface + FrequencyPenalty func(ctx context.Context, obj *types.GPT3) (float64, error) + PresencePenalty func(ctx context.Context, obj *types.GPT3) (float64, error) + Temperature func(ctx context.Context, obj *types.GPT3) (float64, error) + TopP func(ctx context.Context, obj *types.GPT3) (float64, error) + type GetFailError struct + func (g GetFailError) Error() string + type InfoPair struct + Key string + Value string + type MessageEditInput struct + Content *string + EditableTo []uid.ID + VisibleTo []uid.ID + type MessageInput struct + Content string + EditableTo []uid.ID + From uid.ID + VisibleTo []uid.ID + type Mutation struct + func (m Mutation) Delete(_ context.Context, conversationID uid.ID, messageID *uid.ID) (bool, error) + func (m Mutation) EditMessage(_ context.Context, conversationID uid.ID, messageID uid.ID, ...) (bool, error) + func (m Mutation) NewConversation(ctx context.Context, scenarioID uid.ID) (*uid.ID, error) + func (m Mutation) NewMessage(_ context.Context, conversationID uid.ID, message MessageInput) (bool, error) + func (m Mutation) TriggerAction(_ context.Context, conversationID uid.ID, actionID uid.ID) (bool, error) + type MutationResolver interface + Delete func(ctx context.Context, conversationID uid.ID, messageID *uid.ID) (bool, error) + EditMessage func(ctx context.Context, conversationID uid.ID, messageID uid.ID, ...) (bool, error) + NewConversation func(ctx context.Context, scenarioID uid.ID) (*uid.ID, error) + NewMessage func(ctx context.Context, conversationID uid.ID, message MessageInput) (bool, error) + TriggerAction func(ctx context.Context, conversationID uid.ID, actionID uid.ID) (bool, error) + type Query struct + func (q Query) Conversations(ctx context.Context, ids []uid.ID) ([]*Conversation, error) + func (q Query) Meta(_ context.Context) (*ServerMeta, error) + func (q Query) Scenario(ctx context.Context, ids []uid.ID) ([]*Scenario, error) + type QueryResolver interface + Conversations func(ctx context.Context, ids []uid.ID) ([]*Conversation, error) + Meta func(ctx context.Context) (*ServerMeta, error) + Scenario func(ctx context.Context, ids []uid.ID) ([]*Scenario, error) + type ResolverRoot interface + GPT3 func() GPT3Resolver + Mutation func() MutationResolver + Query func() QueryResolver + type Root struct + func (r Root) GPT3() GPT3Resolver + func (r Root) Mutation() MutationResolver + func (r Root) Query() QueryResolver + type Scenario struct + Characters []*Character + Gpt3 *types.GPT3 + ID uid.ID + Info []*InfoPair + Messages []*types.Msg + Meta *ScenarioMeta + type ScenarioMeta struct + Description string + Duration string + Level int + Title string + type ServerMeta struct + Authors []string + GinMode string + GinVersion string + Hash *string + Name string + Version *string + func NewServerMeta() ServerMeta + type TypeError struct + func (t TypeError) Error() string + type User struct + Allow []uid.ID + Block []uid.ID + ID uid.ID + Jwt string