GenAI.Model.Encoder.DefaultProvider (GenAI Core v0.2.0)

Link to this section Summary

Link to this section Functions

Link to this function

apply_hyper_params_and_adjust(module, body, params, model, settings)

Link to this function

completion_choice(module, id, json, model, settings, session, context, options)

Link to this function

completion_choices(module, id, json, model, settings, session, context, options)

Link to this function

completion_response(module, json, model, settings, session, context, options)

Link to this function

default_hyper_params(module, model, settings, session, context, options)

Obtain list of hyper params supported by given model including mapping and conditional rules/alterations

Link to this function

encode_message(module, message, model, session, context, options)

Format message for provider/model type.

Link to this function

encode_tool(module, tool, model, session, context, options)

Format tool for provider/model type.

Link to this function

headers(module, model, settings, session, context, options)

Prepare request headers

Link to this function

hyper_params(module, model, settings, session, context, options)

Obtain list of hyper params supported by given model including mapping and conditional rules/alterations

Link to this function

normalize_messages(module, messages, model, session, context, options)

Link to this function

request_body(module, model, messages, tools, settings, session, context, options)

Prepare request body to be passed to inference call.

Link to this function

with_dynamic_setting(module, body, setting, model, settings, default \\ nil)

Set setting with dynamic model based logic.

Link to this function

with_dynamic_setting_as(module, body, as_setting, setting, model, settings, default \\ nil)

Set setting as_setting with dynamic model based logic.