rp

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatToolsResponse added in v0.1.0

func FormatToolsResponse(response *string)

func TrimStuff added in v0.0.8

func TrimStuff(s *string, prefix, suffix string, replaceFunc func(*string) error) error

Types

type BalanceV1

type BalanceV1 struct {
	BalanceRaw         int64      `json:"balanceRaw"`
	Balance            string     `json:"balance"`
	USD                string     `json:"usd"`
	Images             string     `json:"images"`
	ImagesRaw          int64      `json:"imagesRaw"`
	Searches           string     `json:"searches"`
	SearchesRaw        int64      `json:"searchesRaw"`
	DropAmountRaw      int64      `json:"dropAmountRaw,omitempty"`
	DropAmount         string     `json:"dropAmount,omitempty"`
	TotalAirdroppedRaw int64      `json:"totalAirdroppedRaw,omitempty"`
	TotalAirdropped    string     `json:"totalAirdropped,omitempty"`
	LastAirdropAt      *time.Time `json:"lastAirdropAt,omitempty"`
}

func (BalanceV1) Zeroes

func (BalanceV1) Zeroes() BalanceV1

type MemoriesV1 added in v0.0.8

type MemoriesV1 struct {
	Memories []Memory `json:"memories"`
}

MemoriesV1 represents the response for getting memories

type MemoriesV2 added in v0.0.8

type MemoriesV2 struct {
	LongTerm  []Memory `json:"longTerm"`
	ShortTerm []Memory `json:"shortTerm"`
}

func (MemoriesV2) Bytes added in v0.0.8

func (m MemoriesV2) Bytes() []byte

type Memory added in v0.0.8

type Memory struct {
	ID                 string             `json:"id"`
	Score              float32            `json:"score"`
	Prompt             string             `json:"prompt" firestore:"prompt"`
	Response           string             `json:"response" firestore:"response"`
	Timestamp          time.Time          `json:"timestamp" firestore:"timestamp"`
	VectorDistance     float32            `json:"vector_distance" firestore:"vector_distance"`
	EmbeddingPrompt5   firestore.Vector32 `json:"-" firestore:"embedding_prompt_5"`
	EmbeddingResponse5 firestore.Vector32 `json:"-" firestore:"embedding_response_5"`
	Depth              int                `json:"depth" firestore:"-"`
	Children           []Memory           `json:"children,omitempty" firestore:"-"`
}

Memory represents a conversation memory with vector similarity

func (*Memory) FormatResponse added in v0.0.8

func (mem *Memory) FormatResponse()

func (*Memory) PresignImages added in v0.0.8

func (mem *Memory) PresignImages(ctx context.Context, userID string, cl *filestorage.Client) error

func (*Memory) String added in v0.0.8

func (mem *Memory) String() string

func (*Memory) StripImages added in v0.0.8

func (mem *Memory) StripImages()

Jump to

Keyboard shortcuts

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