mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-28 03:38:11 +08:00
Implement OpenAI chat completions in GO (#16177)
### What problem does this PR solve? Implement OpenAI chat completions in GO POST /api/v1/openai/<chat_id>/chat/completions OpenAI chat cli: internal/development.md ### Type of change - [x] Refactoring
This commit is contained in:
@@ -61,6 +61,10 @@ type DocEngine interface {
|
||||
GetFields(chunks []map[string]interface{}, fields []string) map[string]map[string]interface{}
|
||||
GetAggregation(chunks []map[string]interface{}, fieldName string) []map[string]interface{}
|
||||
GetHighlight(chunks []map[string]interface{}, keywords []string, fieldName string) map[string]string
|
||||
|
||||
// Run SQL
|
||||
RunSQL(ctx context.Context, tableName string, sqlText string, kbIDs []string, format string) ([]map[string]interface{}, error)
|
||||
|
||||
GetChunkIDs(chunks []map[string]interface{}) []string
|
||||
KNNScores(ctx context.Context, chunks []map[string]interface{}, queryVector []float64, topK int) (map[string]interface{}, error)
|
||||
GetScores(searchResult map[string]interface{}) map[string]float64
|
||||
|
||||
Reference in New Issue
Block a user