autogen-openaiext-client
This Autogen client is to help interface quickly with non-OpenAI LLMs through the OpenAI API.
See here for more information on using with custom LLMs.
This repository simply include clients you can use to initialize your LLMs easily - since the Autogen >v0.4 supports the non-OpenAI LLMs within the
autogen_extpackage itself with a really nice and clean changes from jackgerrits here.
=======
Install
pip install autogen-openaiext-client
Usage
from autogen_openaiext_client import GeminiChatCompletionClient
import asyncio
# Initialize the client
client = GeminiChatCompletionClient(model="gemini-1.5-flash", api_key=os.environ["GEMINI_API_KEY"])
# use the client like any other autogen client. For example:
result = asyncio.run(
client.create(
[UserMessage(content="What is the capital of France?", source="user")]
)
)
print(result.content)
# Paris
Currently, Gemini, TogetherAI and Groq clients are supported through the GeminiChatCompletionClient, TogetherAIChatCompletionClient and GroqChatCompletionClient respectively.
Install Magentic-One and run python examples/magentic_coder_example.py for a sample usage with other autogen-based frameworks.
Known Issues
- Tool calling in Gemini through OpenAI API runs into issues.
Contributing
- Adding a new model to existing external providers
- For example, adding a new model to
GeminiChatCompletionClientincludes modifying theGeminiInfoclass ininfo.pyand adding the new model to_MODEL_CAPABILITIESand_MODEL_TOKEN_LIMITSdictionaries.
- For example, adding a new model to
- Adding a new external provider
- Add a new client class in
client.py, relevantProviderInfoclass ininfo.pyand add it to__init__.pyfor easy import.
- Add a new client class in
Disclaimer
This is a community project for Autogen. Feel free to contribute via issues and PRs and I will try my best to get to it every 3 days.
Metadata
Release files for autogen-openaiext-client 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| autogen_openaiext_client-0.0.3.tar.gz | 7.4 kB | With provenance | Details for autogen_openaiext_client-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autogen_openaiext_client-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for autogen_openaiext_client-0.0.3-py3-none-any.whl |
Total release size: 14.2 kB
Release files / autogen_openaiext_client-0.0.3.tar.gz
| Download URL | autogen_openaiext_client-0.0.3.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8dcd7ca43f41d8362f2930deeb96c33aacbb5b9a7b366c5ef02e191d5ec8441c
|
|
BLAKE2b-256 checksum How to use checksums |
4609929af370ec810f2cc653fb9ffe41a9e18bcc5c2c9a4ed4540f2c43a2bb41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 23, 2025.
Transparency logRelease files / autogen_openaiext_client-0.0.3-py3-none-any.whl
| Download URL | autogen_openaiext_client-0.0.3-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f275fe960de3aef97a9022b7a5899900883728985c9d36494ef2828acbb6153
|
|
BLAKE2b-256 checksum How to use checksums |
6fc5a8d744502d05cb8a31ee1bc8e3a7b71a05e837c863f53310f6ea3ffe5bd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 23, 2025.
Transparency logSecurity for autogen-openaiext-client 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for autogen_openaiext_client-0.0.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 23, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.