autogen-openaiext-client


Nameautogen-openaiext-client JSON
Version 0.0.1.dev1 PyPI version JSON
download
home_pageNone
SummaryThis is an autogen>=0.4 extension for integrating external models through the OpenAI API.
upload_time2024-12-04 21:38:53
maintainerNone
docs_urlNone
authorNone
requires_python<3.13,>=3.10
licenseMIT License Copyright (c) 2024 Vaibhav Balloli Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords autogen agent
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # autogen-openaiext-client

This Autogen client is to help interface with non-OpenAI LLMs through the OpenAI API.

# Usage

```python
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](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-magentic-one) and run `python examples/magentic_coder_example.py` for a sample usage with other autogen-based frameworks.



# Known Issues

1. Tool calling in Gemini through OpenAI API runs into issues.

# 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.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "autogen-openaiext-client",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": null,
    "keywords": "autogen, agent",
    "author": null,
    "author_email": "Vaibhav Balloli <balloli.vb@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f5/90/280514a54b40a69a5798210d5c4ec38112a7a9557459b635f86b91e9fda1/autogen_openaiext_client-0.0.1.dev1.tar.gz",
    "platform": null,
    "description": "# autogen-openaiext-client\n\nThis Autogen client is to help interface with non-OpenAI LLMs through the OpenAI API.\n\n# Usage\n\n```python\nfrom autogen_openaiext_client import GeminiChatCompletionClient\nimport asyncio\n\n# Initialize the client\nclient = GeminiChatCompletionClient(model=\"gemini-1.5-flash\", api_key=os.environ[\"GEMINI_API_KEY\"])\n\n# use the client like any other autogen client. For example:\nresult = asyncio.run(\n    client.create(\n        [UserMessage(content=\"What is the capital of France?\", source=\"user\")]\n    )\n)\nprint(result.content)\n# Paris\n```\n\nCurrently, `Gemini`, `TogetherAI` and `Groq` clients are supported through the `GeminiChatCompletionClient`, `TogetherAIChatCompletionClient` and `GroqChatCompletionClient` respectively.\n\nInstall [Magentic-One](https://github.com/microsoft/autogen/tree/main/python/packages/autogen-magentic-one) and run `python examples/magentic_coder_example.py` for a sample usage with other autogen-based frameworks.\n\n\n\n# Known Issues\n\n1. Tool calling in Gemini through OpenAI API runs into issues.\n\n# Disclaimer\n\nThis 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.\n\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Vaibhav Balloli  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "This is an autogen>=0.4 extension for integrating external models through the OpenAI API.",
    "version": "0.0.1.dev1",
    "project_urls": null,
    "split_keywords": [
        "autogen",
        " agent"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "233e5c09515441f5d2a0fd27c959fa7a1d3012f93db046b22681f0282bed2900",
                "md5": "dec4cda7da1bfbd3b53b0c691b046995",
                "sha256": "f4053f9b8d1038cef20255ac1c156c51dd47c9379bff160a952a12f2a82a9f42"
            },
            "downloads": -1,
            "filename": "autogen_openaiext_client-0.0.1.dev1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dec4cda7da1bfbd3b53b0c691b046995",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.10",
            "size": 13103,
            "upload_time": "2024-12-04T21:38:51",
            "upload_time_iso_8601": "2024-12-04T21:38:51.655595Z",
            "url": "https://files.pythonhosted.org/packages/23/3e/5c09515441f5d2a0fd27c959fa7a1d3012f93db046b22681f0282bed2900/autogen_openaiext_client-0.0.1.dev1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f590280514a54b40a69a5798210d5c4ec38112a7a9557459b635f86b91e9fda1",
                "md5": "9b2447e1758e0a7ea25bcf1edc8111a3",
                "sha256": "4e6cc51335731f352b65ce07dcd3ab56faec5a25a3b899d3efd002ff0e4bff25"
            },
            "downloads": -1,
            "filename": "autogen_openaiext_client-0.0.1.dev1.tar.gz",
            "has_sig": false,
            "md5_digest": "9b2447e1758e0a7ea25bcf1edc8111a3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 13068,
            "upload_time": "2024-12-04T21:38:53",
            "upload_time_iso_8601": "2024-12-04T21:38:53.363542Z",
            "url": "https://files.pythonhosted.org/packages/f5/90/280514a54b40a69a5798210d5c4ec38112a7a9557459b635f86b91e9fda1/autogen_openaiext_client-0.0.1.dev1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-04 21:38:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "autogen-openaiext-client"
}
        
Elapsed time: 0.36783s