mirror of
https://github.com/Hopiu/llm.git
synced 2026-04-10 00:10:58 +00:00
* Embeddings plugin hook + OpenAI implementation * llm.get_embedding_model(name) function * llm embed command, for returning embeddings or saving them to SQLite * Tests using an EmbedDemo embedding model * llm embed-models list and emeb-models default commands * llm embed-db path and llm embed-db collections commands
6 lines
146 B
Python
6 lines
146 B
Python
import llm
|
|
|
|
|
|
def test_demo_plugin():
|
|
model = llm.get_embedding_model("embed-demo")
|
|
assert model.embed("hello world") == [5, 5] + [0] * 14
|