flows

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatFlow

type ChatFlow = *core.Flow[ChatInput, ChatOutput, struct{}]

ChatFlow 对话流程

func DefineSimpleChatFlow

func DefineSimpleChatFlow(g *genkit.Genkit, name string, genOpts ...ai.GenerateOption) ChatFlow

DefineSimpleChatFlow 定义简单对话流程

type ChatInput

type ChatInput struct {
	Prompt           string        `json:"prompt"`
	History          []*ai.Message `json:"history,omitempty"`
	MaxContextWindow int64         `json:"maxContextWindow,omitempty"`
}

ChatInput 对话输入

type ChatOutput

type ChatOutput struct {
	Messages          []*ai.Message `json:"messages"`
	LastContextWindow int64         `json:"lastContextWindow,omitempty"`
}

ChatOutput 对话输出

type ToolCallError

type ToolCallError struct {
	Err string `json:"error"`
}

ToolCallError 工具调用错误

func (ToolCallError) Error

func (e ToolCallError) Error() string

Error 返回错误描述

Jump to

Keyboard shortcuts

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