feat: implement RAG utility and chatbot service for AI-powered history assistance
Build and Release / release (push) Successful in 1m23s
Build and Release / release (push) Successful in 1m23s
This commit is contained in:
+2
-2
@@ -93,12 +93,12 @@ func (u *RagUtils) EmbedQuery(ctx context.Context, query string) ([]float32, err
|
||||
if err != nil || len(vectors) == 0 {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
vector := vectors[0]
|
||||
if len(vector) > 1536 {
|
||||
vector = vector[:1536]
|
||||
}
|
||||
|
||||
|
||||
return vector, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user