praval.providers.factory๏ƒ

Factory for creating LLM provider instances.

Provides a unified interface for instantiating different LLM providers with consistent configuration handling.

Classes

ProviderFactory()

Factory class for creating LLM provider instances.

class praval.providers.factory.ProviderFactory[source]๏ƒ

Bases: object

Factory class for creating LLM provider instances.

static create_provider(provider_name, config)[source]๏ƒ

Create an LLM provider instance.

Parameters:
  • provider_name (str) โ€“ Name of the provider (openai, anthropic, cohere)

  • config (Any) โ€“ Configuration object for the provider

Returns:

Provider instance

Raises:

ProviderError โ€“ If provider is not supported or creation fails