Module: Legion::Extensions::Llamacpp::Runners::Embeddings
- Extended by:
- Helpers::Client
- Includes:
- Helpers::Lex
- Included in:
- Client
- Defined in:
- lib/legion/extensions/llamacpp/runners/embeddings.rb
Constant Summary
Helpers::Client::DEFAULT_HOST
Instance Method Summary
collapse
client, streaming_client
Instance Method Details
#embed(model:, input:) ⇒ Object
13
14
15
16
17
|
# File 'lib/legion/extensions/llamacpp/runners/embeddings.rb', line 13
def embed(model:, input:, **)
body = { model: model, input: input }.compact
response = Helpers::Errors.with_retry { client(**).post('/v1/embeddings', body) }
{ result: response.body, status: response.status }
end
|