vapi-python


Namevapi-python JSON
Version 0.1.8 PyPI version JSON
download
home_pagehttps://github.com/jordan.cde/vapi_python
SummaryThis package lets you start Vapi calls directly from Python.
upload_time2023-12-02 19:31:54
maintainer
docs_urlNone
authorVapi AI
requires_python>=3.6
licenseMIT license
keywords vapi_python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ===============
Vapi Python SDK
===============


.. image:: https://img.shields.io/pypi/v/vapi_python.svg
        :target: https://pypi.python.org/pypi/vapi_python

.. image:: https://img.shields.io/travis/jordan.cde/vapi_python.svg
        :target: https://travis-ci.com/jordan.cde/vapi_python

.. image:: https://readthedocs.org/projects/vapi-python/badge/?version=latest
        :target: https://vapi-python.readthedocs.io/en/latest/?version=latest
        :alt: Documentation Status


This package lets you start Vapi calls directly from Python.

Installation
------------

You can install the package via pip:

.. code-block:: bash

   pip install vapi_python

Usage
-----

First, import the Vapi class from the package:

.. code-block:: python

   from vapi_python import Vapi

Then, create a new instance of the Vapi class, passing your API Key as a parameter to the constructor:

.. code-block:: python

   vapi = Vapi(api_key='your-api-key')

You can start a new call by calling the `start` method and passing an `assistant` object or `assistantId`. You can find the available options here: `docs.vapi.ai <https://docs.vapi.ai/api-reference/assistants/create-assistant>`

.. code-block:: python

   vapi.start(assistant_id='your-assistant-id')

or

.. code-block:: python

   assistant = {
     'firstMessage': 'Hey, how are you?',
     'context': 'You are a shopping assistant...',
     'model': 'gpt-3.5-turbo',
     'voice': 'jennifer-playht',
     "recordingEnabled": True,
     "interruptionsEnabled": False,
     "functions": [
       {
         "name": "setColor",
         "description": "Used to set the color",
         "parameters": { 
             "type": "object",
             "properties": { 
                 "color": { 
                 "type": "string" 
                 } 
             }
         }
       }
     ]
   }

   vapi.start(assistant=assistant)

The `start` method will initiate a new call. 

You can stop the session by calling the `stop` method:

.. code-block:: python

   vapi.stop()

This will stop the recording and close the connection.

License
-------

MIT License

Copyright (c) 2023 Vapi Labs Inc.

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.

Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage



=======
History
=======

0.1.0 (2023-11-17)
------------------

* First release on PyPI.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jordan.cde/vapi_python",
    "name": "vapi-python",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "vapi_python",
    "author": "Vapi AI",
    "author_email": "team@vapi.ai",
    "download_url": "https://files.pythonhosted.org/packages/ca/29/fa0ac15d320a5c4000b1e4cf5d68862c6a5c28dffa1a30e268d76185df71/vapi_python-0.1.8.tar.gz",
    "platform": null,
    "description": "===============\nVapi Python SDK\n===============\n\n\n.. image:: https://img.shields.io/pypi/v/vapi_python.svg\n        :target: https://pypi.python.org/pypi/vapi_python\n\n.. image:: https://img.shields.io/travis/jordan.cde/vapi_python.svg\n        :target: https://travis-ci.com/jordan.cde/vapi_python\n\n.. image:: https://readthedocs.org/projects/vapi-python/badge/?version=latest\n        :target: https://vapi-python.readthedocs.io/en/latest/?version=latest\n        :alt: Documentation Status\n\n\nThis package lets you start Vapi calls directly from Python.\n\nInstallation\n------------\n\nYou can install the package via pip:\n\n.. code-block:: bash\n\n   pip install vapi_python\n\nUsage\n-----\n\nFirst, import the Vapi class from the package:\n\n.. code-block:: python\n\n   from vapi_python import Vapi\n\nThen, create a new instance of the Vapi class, passing your API Key as a parameter to the constructor:\n\n.. code-block:: python\n\n   vapi = Vapi(api_key='your-api-key')\n\nYou can start a new call by calling the `start` method and passing an `assistant` object or `assistantId`. You can find the available options here: `docs.vapi.ai <https://docs.vapi.ai/api-reference/assistants/create-assistant>`\n\n.. code-block:: python\n\n   vapi.start(assistant_id='your-assistant-id')\n\nor\n\n.. code-block:: python\n\n   assistant = {\n     'firstMessage': 'Hey, how are you?',\n     'context': 'You are a shopping assistant...',\n     'model': 'gpt-3.5-turbo',\n     'voice': 'jennifer-playht',\n     \"recordingEnabled\": True,\n     \"interruptionsEnabled\": False,\n     \"functions\": [\n       {\n         \"name\": \"setColor\",\n         \"description\": \"Used to set the color\",\n         \"parameters\": { \n             \"type\": \"object\",\n             \"properties\": { \n                 \"color\": { \n                 \"type\": \"string\" \n                 } \n             }\n         }\n       }\n     ]\n   }\n\n   vapi.start(assistant=assistant)\n\nThe `start` method will initiate a new call. \n\nYou can stop the session by calling the `stop` method:\n\n.. code-block:: python\n\n   vapi.stop()\n\nThis will stop the recording and close the connection.\n\nLicense\n-------\n\nMIT License\n\nCopyright (c) 2023 Vapi Labs Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n\n=======\nHistory\n=======\n\n0.1.0 (2023-11-17)\n------------------\n\n* First release on PyPI.\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "This package lets you start Vapi calls directly from Python.",
    "version": "0.1.8",
    "project_urls": {
        "Homepage": "https://github.com/jordan.cde/vapi_python"
    },
    "split_keywords": [
        "vapi_python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4691341170433c98da3a6aefea96841d5c596d82c494d0cd66e793a4c644d66f",
                "md5": "d37d8fd51df383465196924de09f272e",
                "sha256": "fd8aaffbf6bb5d49625e95a01d23f1e4f7f113f812782641d2aa2db59d68b974"
            },
            "downloads": -1,
            "filename": "vapi_python-0.1.8-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d37d8fd51df383465196924de09f272e",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 6330,
            "upload_time": "2023-12-02T19:31:52",
            "upload_time_iso_8601": "2023-12-02T19:31:52.567633Z",
            "url": "https://files.pythonhosted.org/packages/46/91/341170433c98da3a6aefea96841d5c596d82c494d0cd66e793a4c644d66f/vapi_python-0.1.8-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ca29fa0ac15d320a5c4000b1e4cf5d68862c6a5c28dffa1a30e268d76185df71",
                "md5": "c05e3c03c983cb487e182bd3b80b7830",
                "sha256": "651f9fa2154b2f44795ce6c2aca36a5dab1237706642aea77f05d0759d1afceb"
            },
            "downloads": -1,
            "filename": "vapi_python-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "c05e3c03c983cb487e182bd3b80b7830",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 5583,
            "upload_time": "2023-12-02T19:31:54",
            "upload_time_iso_8601": "2023-12-02T19:31:54.001447Z",
            "url": "https://files.pythonhosted.org/packages/ca/29/fa0ac15d320a5c4000b1e4cf5d68862c6a5c28dffa1a30e268d76185df71/vapi_python-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-02 19:31:54",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jordan.cde",
    "github_project": "vapi_python",
    "github_not_found": true,
    "lcname": "vapi-python"
}
        
Elapsed time: 0.47088s