fetch

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2026 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Overview

Package fetch 提供 HTTP 请求工具。

fetch 向任意 URL 发起 HTTP 请求,响应写入 temp 对象(@temp/fetch/...)供 AI 读取。 支持:

  • hidden 模式:用 utls 做 Chrome TLS 指纹伪装 + 浏览器风格 headers 模拟真实浏览器, 配合 FetchProxy 时手动建立 CONNECT/socks5 隧道以保留指纹;
  • summary 模式:非空时调用 LLM 按提示词把抓取内容总结成 markdown;
  • FetchProxy 配置:顶层 Agent 段全局 HTTP 代理(http/https/socks5)。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetSummarizeFn

func SetSummarizeFn(fn SummarizeFn)

SetSummarizeFn 设置抓取内容总结函数(在 ui/startup 中调用)。

Types

type SummarizeFn

type SummarizeFn func(ctx context.Context, rawContent, summaryPrompt string, modelID int32) (string, error)

SummarizeFn 抓取内容总结函数类型,由 SetSummarizeFn 注入。

Jump to

Keyboard shortcuts

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