Metadata-Version: 2.4
Name: py-llm-factory
Version: 0.3.0
Summary: This is the Python package py-llm-factory.
Author-email: Tony Lee <iamtonylee@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/hktonylee/py-llm-factory
Project-URL: Repository, https://github.com/hktonylee/py-llm-factory
Classifier: Programming Language :: Python :: 3
Classifier: Development Status :: 3 - Alpha
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: py-llm-factory[openai]; extra == "dev"
Requires-Dist: py-llm-factory[groq]; extra == "dev"
Provides-Extra: openai
Requires-Dist: openai; extra == "openai"
Provides-Extra: groq
Requires-Dist: groq; extra == "groq"

# Welcome

llm-factory is a python package that can select and install LLM provider dynamically.

# Usage

```python
import py_llm_factory

# By default, it will use the LLM provider from the environment variables.
client = py_llm_factory.get_openai_compatible_client()

# You can also specify the LLM provider and API key.
client = py_llm_factory.get_openai_compatible_client(provider='openai', api_key='your_api_key')

# Let's say if you want to use the Groq provider, you can do this:
client = py_llm_factory.get_openai_compatible_client(provider='groq', api_key='your_api_key')

# Or AWS Bedrock provider, you can do this:
client = py_llm_factory.get_openai_compatible_client(provider='openai', api_key='your_api_key', base_url='https://bedrock-runtime.us-east-1.amazonaws.com/openai/v1')
```
