mcp

package
v0.0.0-...-e986fc6 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIndexerByFileBase64ContentTool

func GetIndexerByFileBase64ContentTool() *protocol.Tool

func GetIndexerByFilePathTool

func GetIndexerByFilePathTool() *protocol.Tool

func GetKnowledgeBaseTool

func GetKnowledgeBaseTool() *protocol.Tool

func GetRetrieverTool

func GetRetrieverTool() *protocol.Tool

func HandleIndexerByFileBase64Content

func HandleIndexerByFileBase64Content(ctx context.Context, req *protocol.CallToolRequest) (*protocol.CallToolResult, error)

func HandleKnowledgeBase

func HandleKnowledgeBase(ctx context.Context, toolReq *protocol.CallToolRequest) (res *protocol.CallToolResult, err error)

func HandleRetriever

func HandleRetriever(ctx context.Context, toolReq *protocol.CallToolRequest) (res *protocol.CallToolResult, err error)

Types

type IndexFileParam

type IndexFileParam struct {
	Filename      string `json:"filename" description:"文件名字" required:"true"`
	Content       string `json:"content" description:"被base64编码后的文件内容,先调用工具获取base64信息" required:"true"` // 可以是文件路径(pdf,html,md等),也可以是网址文件" required:"true"` // 可以是文件路径(pdf,html,md等),也可以是网址
	KnowledgeName string ``                                                                             /* 199-byte string literal not displayed */
}

type IndexParam

type IndexParam struct {
	URI           string `json:"uri" description:"文件路径" required:"true"` // 可以是文件路径(pdf,html,md等),也可以是网址
	KnowledgeName string ``                                              /* 199-byte string literal not displayed */
}

type KnowledgeBaseParam

type KnowledgeBaseParam struct {
}

type RetrieverParam

type RetrieverParam struct {
	Question      string  `json:"question" description:"用户提问的问题" required:"true"`
	KnowledgeName string  ``                                                              /* 165-byte string literal not displayed */
	TopK          int     `json:"top_k" description:"检索结果的数量,默认为5" required:"false"`      // 默认为5
	Score         float64 `json:"score"  description:"检索结果的分数阀值,默认为0.2" required:"false"` // 默认为0.2
}

Jump to

Keyboard shortcuts

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