morpheus.llm.services.openai_chat_service.OpenAIChatService

class OpenAIChatService[source]

Bases: morpheus.llm.services.llm_service.LLMService

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

Methods

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

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

Parameters
model_namestr

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.

model_kwargsdict[str, typing.Any]

Additional keyword arguments to pass to the model when generating text.

Previous morpheus.llm.services.openai_chat_service.OpenAIChatClient
Next morpheus.llm.task_handlers
© Copyright 2023, NVIDIA. Last updated on Feb 2, 2024.