Documentation
¶
Index ¶
- func GetIndexerByFileBase64ContentTool() *protocol.Tool
- func GetIndexerByFilePathTool() *protocol.Tool
- func GetKnowledgeBaseTool() *protocol.Tool
- func GetRetrieverTool() *protocol.Tool
- func HandleIndexerByFileBase64Content(ctx context.Context, req *protocol.CallToolRequest) (*protocol.CallToolResult, error)
- func HandleIndexerByFilePath(ctx context.Context, req *protocol.CallToolRequest) (*protocol.CallToolResult, error)
- func HandleKnowledgeBase(ctx context.Context, toolReq *protocol.CallToolRequest) (res *protocol.CallToolResult, err error)
- func HandleRetriever(ctx context.Context, toolReq *protocol.CallToolRequest) (res *protocol.CallToolResult, err error)
- type IndexFileParam
- type IndexParam
- type KnowledgeBaseParam
- type RetrieverParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetKnowledgeBaseTool ¶
func GetRetrieverTool ¶
func HandleIndexerByFileBase64Content ¶
func HandleIndexerByFileBase64Content(ctx context.Context, req *protocol.CallToolRequest) (*protocol.CallToolResult, error)
func HandleIndexerByFilePath ¶
func HandleIndexerByFilePath(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 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
}
Click to show internal directories.
Click to hide internal directories.