Feat: add rag [wip; skip-ci]

This commit is contained in:
Grail Finder
2024-12-31 13:25:13 +03:00
parent 4db8aea43d
commit 461d19aa25
13 changed files with 292 additions and 8 deletions

View File

@@ -106,3 +106,22 @@ type ChatToolsBody struct {
} `json:"tools"`
ToolChoice string `json:"tool_choice"`
}
type EmbeddingResp struct {
Embedding []float32 `json:"embedding"`
Index uint32 `json:"index"`
}
// type EmbeddingsResp struct {
// Model string `json:"model"`
// Object string `json:"object"`
// Usage struct {
// PromptTokens int `json:"prompt_tokens"`
// TotalTokens int `json:"total_tokens"`
// } `json:"usage"`
// Data []struct {
// Embedding []float32 `json:"embedding"`
// Index int `json:"index"`
// Object string `json:"object"`
// } `json:"data"`
// }