(Latest Version)
class OpenAIChatService(*, default_model_kwargs=None)[source]


A service for interacting with OpenAI Chat models, this class should be used to create clients.


get_client(*, model_name[, set_assistant, ...]) Returns a client for interacting with a specific model.
get_client(*, model_name, set_assistant=False, max_retries=10, **model_kwargs)[source]

Returns a client for interacting with a specific model. This method is the preferred way to create a client.


The name of the model to create a client for.

set_assistant: bool, optional default=False

When True, a second input field named assistant will be used to proide additional context to the model.

max_retries: int, optional default=10

The maximum number of retries to attempt when making a request to the OpenAI API.


Additional keyword arguments to pass to the model when generating text. Arguments specified here will overwrite the default_model_kwargs set in the service constructor

Next morpheus.llm.task_handlers
© Copyright 2024, NVIDIA. Last updated on Apr 25, 2024.