mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 04:23:15 -05:00
fix(studio): name the file store search engine scan, not memory
The provider guard test refuses core code that names an add-on, and "memory" is the name of one. The file store searched its in-memory transcripts and reported the engine as "memory". It now reports "scan", as every store without an index does. Assisted-by: Claude:claude-sonnet-5-5
This commit is contained in:
3 files changed
+3
-3
No files matched your search
@@ -71,7 +71,7 @@ type ChatsChatHit struct {
|
||||
// ChatsChatSearchResponse is the response of the chat search.
|
||||
type ChatsChatSearchResponse struct {
|
||||
Hits []ChatsChatHit `json:"hits"`
|
||||
// Engine is how the server searched: fts5, pg_trgm, scan or memory.
|
||||
// Engine is how the server searched: fts5, pg_trgm or scan.
|
||||
Engine string `json:"engine,omitempty"`
|
||||
// Indexing is true while the server still adds earlier chats to its
|
||||
// search index, so older chats may be missing from the hits.
|
||||
|
||||
@@ -120,7 +120,7 @@ type Progress struct {
|
||||
// Result is the answer of a search.
|
||||
type Result struct {
|
||||
Hits []Hit
|
||||
// Engine is how the store searched: fts5, pg_trgm, scan or memory.
|
||||
// Engine is how the store searched: fts5, pg_trgm or scan.
|
||||
Engine string
|
||||
// Partial is true when a time budget ended the search before every chat
|
||||
// was read (a store without an index).
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
// scans them, the newest chat first, until chatsearch.ScanBudget is spent.
|
||||
// Result.Searched and Total say how many chats it read.
|
||||
func (s *jsonStore) SearchText(ctx context.Context, q chatsearch.Query) (chatsearch.Result, error) {
|
||||
res := chatsearch.Result{Engine: "memory"}
|
||||
res := chatsearch.Result{Engine: engineScan}
|
||||
terms := q.Terms()
|
||||
if len(terms) == 0 {
|
||||
return res, nil
|
||||
|
||||
Reference in new issue
Block a user