schema

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Pachage schema include BaseIOSchema etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attachement

type Attachement struct {
	// ImageURL attached image_url
	ImageURLs []string `json:"image_url,omitempty"`
	// Files attached file
	Files []io.Reader `json:"file,omitempty"`
}

Attachement message attachement

type Base

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

Base is a base schema

func (Base) Attachement

func (r Base) Attachement() *Attachement

Attachement returns schema attachement

func (Base) Snapshot

func (r Base) Snapshot() Schema

func (Base) String

func (r Base) String() string

String implements Schema interface

type Input

type Input struct {
	Base
	// ChatMessage is the chat message sent by the user to the assistant.
	ChatMessage string `json:"chat_message" jsonschema:"title=chat_message,description=The chat message sent by the user to the assistant."`
}

Input implements BaseAgentInputSchema This schema represents the input from the user to the AI agent.

func NewInput

func NewInput(chatMessage string) *Input

NewInput returns a new BaseAgentInput

func (Input) Snapshot

func (s Input) Snapshot() Schema

Snapshot implements Schema interface

func (Input) String

func (s Input) String() string

String implements Schema interface

type Output

type Output struct {
	Base
	// ChatMessage is the chat message exchanged between the user and the chat agent.
	// contains the markdown-enabled response generated by the chat agent.
	ChatMessage string `` /* 199-byte string literal not displayed */
}

Output implements BaseAgentOutputSchema This schema represents the response generated by the chat agent.

func NewOutput

func NewOutput(chatMessage string) *Output

NewOutput returns a new BaseAgentOutput

func (Output) Snapshot

func (s Output) Snapshot() Schema

Snapshot implements Schema interface

func (Output) String

func (s Output) String() string

String implements Schema interface

type Schema

type Schema interface {
	// String returns a string representation of the schema
	String() string
	// Snapshot returns a snapshot of the schema
	Snapshot() Schema
	// Attachement() returns schema attchement
	Attachement() *Attachement
}

Schema is message schema interface

type String

type String string

func (String) Attachement

func (s String) Attachement() *Attachement

func (String) Snapshot

func (s String) Snapshot() Schema

func (String) String

func (s String) String() string

Jump to

Keyboard shortcuts

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