You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added ASI Cloud support as an embedding provider (both for the initial knowledge import and the src/rag.py module)*
Updated all relevant documentation in docs/
Updated autotests
Added a new config value - embeddingModel
Updated the import-kb dependency to 0.2.4**
*This PR supersedes #333
**0.2.4 has not been published yet. This PR must be merged only after import-kb version 0.2.4 is published.
How Has This Been Tested?
Tested with the updated import-kb version 0.2.4. Knowledge imports were successfully completed using all three supported embedding providers: Local, OpenAI, and ASI Cloud. The same providers were successfully tested with the src/rag.py module.
Checklist
PR contains autogenerated code
Self-review completed
Test scenarios above are passed with the version of the code from PR
Tested: 9870791, embeddings on ASICloud, OpenAI and Local, container started with docker run.
Works:
With embeddingModel=WhereIsAI/UAE-Large-V1 memory goes through ASI Cloud: the stored vector matches ASI Cloud's embedding of the same text, and query returns the stored fact
Knowledge-base import on start with ASICloud: 27882 records in 56 requests, no rate-limit errors, and query returns knowledge-base text
A missing or rejected ASI_API_KEY stops the container at start with a clear error. No sentinel is written, so the next start tries again
OpenAI and Local embeddings still work, and run_mandatory passes
Doesn't work:
embeddingprovider=ASICloud without embeddingModel breaks memory. The default is text-embedding-3-large (config.yaml#L42, reference-configuration.md#L37), and ASI Cloud answers 400 Model not found: for embeddings it serves only WhereIsAI/UAE-Large-V1 and BAAI/bge-base-en-v1.5. Every remember and query fails, while the knowledge-base import with the same settings succeeds, because import-kb falls back to UAE on its own. The agent gets RuntimeError (<py_RuntimeError>(0x…)), and nothing in the log says why (rag.py#L150-L153)
A memory archive imported on start under ASICloud gets re-embedded with the local e5 model (storage.py#L183-L190, called from entrypoint.sh#L76-L82). The import sends nothing to ASI Cloud, and queries use UAE vectors, so once the knowledge base is loaded the imported fact is not in the top 20 results even for its own text
Autotests/import_knowledge/test_import_knowledge.py fails after this change: 15 passed before it, 14 passed and 1 failed now. Line 65 expects import-knowledge with no arguments for OpenAI, and the script now passes --provider openai. The file is in neither run_mandatory nor run_optional, so CI never runs it
README still says EMBEDDING_PROVIDER is OpenAI or Local
scripts/omega sets embeddingprovider=Local for -p ASICloud, so ASICloud embeddings can only be enabled with docker run. That is what the review of #333 asked for, so I am not reporting it as a defect.
I opened #352 with fixes for all of the above. It targets this PR's branch, and the import-kb script tests are registered in run_mandatory there, so CI runs them from now on. Please review it and merge it into this branch if it looks fine.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
src/rag.pymodule)*embeddingModel*This PR supersedes #333
**
0.2.4has not been published yet. This PR must be merged only afterimport-kbversion0.2.4is published.How Has This Been Tested?
Tested with the updated
import-kbversion0.2.4. Knowledge imports were successfully completed using all three supported embedding providers: Local, OpenAI, and ASI Cloud. The same providers were successfully tested with thesrc/rag.pymodule.Checklist