"空请求"技巧预加载模型目前不适用于嵌入模型。
来源:https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-preload-a-model-into-ollama-to-get-faster-response-times 和 #2431
$ curl http://localhost:11434/api/embed -d '{"model": "all-minilm:latest"}'
{"error":"invalid input type"}%
ollama --version
ollama version is 0.3.4
2条答案
按热度按时间sgtfey8w1#
目前可以使用已弃用的/embeddings端点进行解决:
此外,看起来ollama-js类型也需要更新,.embed和.embeddings方法都需要input/prompt。
2w3kk1z52#
我刚刚发送了一个带有无限
keep_alive
的丢弃请求,如下所示: