graph

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountNode

func AccountNode(ctx context.Context, s any) (any, error)

AccountNode 使用 Tavily API 搜索用户 ID,并使用 LLM 提取

func NewGraph

func NewGraph() (*g.StateRunnable, error)

func ProfileNode

func ProfileNode(ctx context.Context, s any) (any, error)

func SearchNode

func SearchNode(ctx context.Context, s any) (any, error)

Types

type Result

type Result struct {
	Name   string `json:"name"`
	Link   string `json:"link"`
	Exists bool   `json:"exists"`
}

Result 代表社交媒体账户搜索结果。

type State

type State struct {
	Username         string      `json:"username"`
	UserID           string      `json:"user_id"`            // 从 Tavily 搜索结果中提取的 user ID
	TavilySearchData string      `json:"tavily_search_data"` // Tavily API 返回的原始搜索结果
	SocialData       []Result    `json:"social_data"`
	ProfileData      string      `json:"profile_data"`
	ProfileText      string      `json:"profile_text"`
	LogChan          chan string `json:"-"`
}

State 定义了画像生成图的状态。

Jump to

Keyboard shortcuts

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