morpheus_llm.llm.services.llm_service.LLMService#
- class LLMService[source]#
Bases:
ABCAbstract interface for services which are able to construct clients for interacting with LLM models.
Methods
create()Returns a service for interacting with LLM models.
get_client(*, model_name, **model_kwargs)Returns a client for interacting with a specific model.
- static create(
- service_type: Literal['nemo'],
- *service_args,
- **service_kwargs,
- static create(
- service_type: Literal['openai'],
- *service_args,
- **service_kwargs,
- static create(
- service_type: str,
- *service_args,
- **service_kwargs,
Returns a service for interacting with LLM models.
- Parameters:
- service_typestr
The type of the service to create
- service_argslist
Additional arguments to pass to the service.
- service_kwargsdict[str, typing.Any]
Additional keyword arguments to pass to the service.
- abstractmethod get_client(*, model_name, **model_kwargs)[source]#
Returns a client for interacting with a specific model.
- Parameters:
- model_namestr
The name of the model to create a client for.
- model_kwargsdict[str, typing.Any]
Additional keyword arguments to pass to the model.
- Returns:
- LLMClient
Client for interacting with LLM models.