Skip to main content

PyPI version License: MIT Downloads

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:

pip install GPTIntegration

Usage

As a Python Module

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

Example:

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.

License

MIT

Metadata

Release files for GPTIntegration 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for GPTIntegration 0.0.7
File Size Uploaded Provenance Actions
GPTIntegration-0.0.7.tar.gz 3.4 kB Without provenance Details for GPTIntegration-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for GPTIntegration 0.0.7
File Interpreter ABI Platform Actions
GPTIntegration-0.0.7-py3-none-any.whl Python 3 none any Details for GPTIntegration-0.0.7-py3-none-any.whl

Total release size: 7.8 kB

Release files / GPTIntegration-0.0.7.tar.gz

Download URL GPTIntegration-0.0.7.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0571e1644a5e9ac64eabae6fdff6d7d6a169857d2f1174e3d2ab43d22753c08a
BLAKE2b-256 checksum
How to use checksums
1058a78b68fa3ea31e805a2442203048d5cccb7ff054587407e50bc28e44c95f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.3

Release files / GPTIntegration-0.0.7-py3-none-any.whl

Download URL GPTIntegration-0.0.7-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01c6989a7826d791deca0a507e22a784298098c75c9fd736ea928f84426631b9
BLAKE2b-256 checksum
How to use checksums
960681006dfd50b8193fa7da78cdacf1bb25b2234182fe1aa502360f51f58d3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.3

Security for GPTIntegration 0.0.7

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page