GPTIntegration


NameGPTIntegration JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/chigwell/GPTIntegration
SummaryA module for integrating various GPT models for diverse tasks.
upload_time2024-01-08 19:11:12
maintainer
docs_urlNone
authorEugene Evstafev
requires_python>=3.6
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![PyPI version](https://badge.fury.io/py/GPTIntegration.svg)](https://badge.fury.io/py/GPTIntegration)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Downloads](https://static.pepy.tech/badge/gptintegration)](https://pepy.tech/project/gptintegration)

# GPTIntegration

`GPTIntegration` is a Python module for integrating GPT models from OpenAI into your projects. It simplifies querying GPT models by handling the setup, communication, and response parsing with the OpenAI API, enabling easy integration and efficient interaction with GPT models.

## Installation

To install `GPTIntegration`, you can use pip:

```bash
pip install GPTIntegration
```

## Usage

### As a Python Module

You can use `GPTIntegration` as a module in your Python scripts.

Example:

```python
from gptintegration import GPTIntegration

# Initialize the integration with your OpenAI API key
gpt_integration = GPTIntegration('your-openai-api-key')

# Prepare messages
system_message = "Your system message goes here."
user_messages = ["Your prompt or user message goes here."]

# Query GPT and get the response
response = gpt_integration.query_gpt(system_message, user_messages)
print(response)
```

### Customizing Your Query

You can customize your query by adjusting the initialization parameters of the `GPTIntegration` class, such as model, temperature, max tokens, and others to fit the specific needs of your application or to tweak the behavior of the GPT model.

## Output Example

When you query GPT using `GPTIntegration`, it sends the system and user messages to the specified GPT model and returns the model's response. Here is an example output:

```
{
    "id": "example-response-id",
    "object": "text_completion",
    "created": 123456789,
    "model": "gpt-3.5-turbo",
    ...,
    "choices": [
        {
            "text": "Response from the GPT model based on the provided messages...",
            "index": 0,
            "logprobs": null,
            "finish_reason": "length"
        }
    ]
}
```

## Contributing

Contributions, issues, and feature requests are welcome! Feel free to check [issues page](https://github.com/chigwell/gptintegration/issues).

## License

[MIT](https://choosealicense.com/licenses/mit/)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/chigwell/GPTIntegration",
    "name": "GPTIntegration",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Eugene Evstafev",
    "author_email": "chigwel@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/10/58/a78b68fa3ea31e805a2442203048d5cccb7ff054587407e50bc28e44c95f/GPTIntegration-0.0.7.tar.gz",
    "platform": null,
    "description": "[![PyPI version](https://badge.fury.io/py/GPTIntegration.svg)](https://badge.fury.io/py/GPTIntegration)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Downloads](https://static.pepy.tech/badge/gptintegration)](https://pepy.tech/project/gptintegration)\n\n# GPTIntegration\n\n`GPTIntegration` is a Python module for integrating GPT models from OpenAI into your projects. It simplifies querying GPT models by handling the setup, communication, and response parsing with the OpenAI API, enabling easy integration and efficient interaction with GPT models.\n\n## Installation\n\nTo install `GPTIntegration`, you can use pip:\n\n```bash\npip install GPTIntegration\n```\n\n## Usage\n\n### As a Python Module\n\nYou can use `GPTIntegration` as a module in your Python scripts.\n\nExample:\n\n```python\nfrom gptintegration import GPTIntegration\n\n# Initialize the integration with your OpenAI API key\ngpt_integration = GPTIntegration('your-openai-api-key')\n\n# Prepare messages\nsystem_message = \"Your system message goes here.\"\nuser_messages = [\"Your prompt or user message goes here.\"]\n\n# Query GPT and get the response\nresponse = gpt_integration.query_gpt(system_message, user_messages)\nprint(response)\n```\n\n### Customizing Your Query\n\nYou can customize your query by adjusting the initialization parameters of the `GPTIntegration` class, such as model, temperature, max tokens, and others to fit the specific needs of your application or to tweak the behavior of the GPT model.\n\n## Output Example\n\nWhen you query GPT using `GPTIntegration`, it sends the system and user messages to the specified GPT model and returns the model's response. Here is an example output:\n\n```\n{\n    \"id\": \"example-response-id\",\n    \"object\": \"text_completion\",\n    \"created\": 123456789,\n    \"model\": \"gpt-3.5-turbo\",\n    ...,\n    \"choices\": [\n        {\n            \"text\": \"Response from the GPT model based on the provided messages...\",\n            \"index\": 0,\n            \"logprobs\": null,\n            \"finish_reason\": \"length\"\n        }\n    ]\n}\n```\n\n## Contributing\n\nContributions, issues, and feature requests are welcome! Feel free to check [issues page](https://github.com/chigwell/gptintegration/issues).\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A module for integrating various GPT models for diverse tasks.",
    "version": "0.0.7",
    "project_urls": {
        "Homepage": "https://github.com/chigwell/GPTIntegration"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "960681006dfd50b8193fa7da78cdacf1bb25b2234182fe1aa502360f51f58d3a",
                "md5": "9f4992a1e4024f54df69f8d945f8c15e",
                "sha256": "01c6989a7826d791deca0a507e22a784298098c75c9fd736ea928f84426631b9"
            },
            "downloads": -1,
            "filename": "GPTIntegration-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9f4992a1e4024f54df69f8d945f8c15e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 4410,
            "upload_time": "2024-01-08T19:11:09",
            "upload_time_iso_8601": "2024-01-08T19:11:09.759650Z",
            "url": "https://files.pythonhosted.org/packages/96/06/81006dfd50b8193fa7da78cdacf1bb25b2234182fe1aa502360f51f58d3a/GPTIntegration-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1058a78b68fa3ea31e805a2442203048d5cccb7ff054587407e50bc28e44c95f",
                "md5": "50709d647510534dac7fd6b703d8fbfe",
                "sha256": "0571e1644a5e9ac64eabae6fdff6d7d6a169857d2f1174e3d2ab43d22753c08a"
            },
            "downloads": -1,
            "filename": "GPTIntegration-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "50709d647510534dac7fd6b703d8fbfe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3421,
            "upload_time": "2024-01-08T19:11:12",
            "upload_time_iso_8601": "2024-01-08T19:11:12.918565Z",
            "url": "https://files.pythonhosted.org/packages/10/58/a78b68fa3ea31e805a2442203048d5cccb7ff054587407e50bc28e44c95f/GPTIntegration-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-08 19:11:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "chigwell",
    "github_project": "GPTIntegration",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "gptintegration"
}
        
Elapsed time: 0.72952s