GenAI.Provider.OpenAI (Noizu Labs, GenAI Wrapper v0.2.3)
Module for interacting with the OpenAI API.
Link to this section Summary
Functions
Callback implementation for GenAI.InferenceProviderBehaviour.chat/7
.
Return config_key inference provide application config stored under :genai entry
Obtain map of effective settings: settings, model_settings, provider_settings, config_settings, etc.
Prepare endpoint and method to make inference call to
Prepare request headers
Retrieves a list of models supported by the OpenAI API for given user.
Prepare request body to be passed to inference call.
Build and run inference thread
Callback implementation for GenAI.InferenceProviderBehaviour.standardize_model/1
.
Link to this section Functions
chat(messages, tools, settings)
chat(model, messages, tools, hyper_parameters, provider_settings \\ [], context \\ nil, options \\ nil)
Callback implementation for GenAI.InferenceProviderBehaviour.chat/7
.
config_key()
Return config_key inference provide application config stored under :genai entry
default_encoder()
effective_settings(model, session, context, options \\ nil)
Obtain map of effective settings: settings, model_settings, provider_settings, config_settings, etc.
endpoint(model, settings, session, context, options \\ nil)
Prepare endpoint and method to make inference call to
headers(options)
headers(model, settings, session, context, options \\ nil)
Prepare request headers
models(settings \\ [])
Retrieves a list of models supported by the OpenAI API for given user.
request_body(model, messages, tools, settings, session, context, options \\ nil)
Prepare request body to be passed to inference call.
run(session, context, options \\ nil)
Build and run inference thread
standardize_model(model)
Callback implementation for GenAI.InferenceProviderBehaviour.standardize_model/1
.