Skip to main content

CODEGPT python package

Project description

CODEGPT Python Package

This package provides you with an easy way to interact with the CODEGPT API in your Python applications.

Install

To install the package, simply run the following command:

pip install codegpt-sdk

Usege

Below is a sample code demonstrating how to use the CODEGPT package in your Python application:

# Import the package
import asyncio
from codegpt.agent import Agent

def main():
    # Replace with your actual API key and URL ID
    api_key = "your_api_key_here"
    agent_id = "your_agent_id_here"

    # Initialize the CODEGPT class
    agent_instance = Agent(api_key, agent_id)

    # Optional: update API key or URL ID if needed
    agent_instance.set_api_key("new_api_key")
    agent_instance.set_agent_id("new_agent_id")

    # Create the prompt
    prompt = "tell me short story about blue turtle"

    # Make a completion request
    response = asyncio.run(agent_instance.completion(prompt, stream=False))

    # Handle the response as needed
    print(response)

if __name__ == "__main__":
    main()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codegpt-sdk-1.0.3.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

codegpt_sdk-1.0.3-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file codegpt-sdk-1.0.3.tar.gz.

File metadata

  • Download URL: codegpt-sdk-1.0.3.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.12

File hashes

Hashes for codegpt-sdk-1.0.3.tar.gz
Algorithm Hash digest
SHA256 f851108a9e28017d4e67f1f63dc0bdf4302fae066ac55993bc702f441eb7f38a
MD5 cbfd8b04485f46a12cf81b253966b8e5
BLAKE2b-256 58955d53a37fdbda67a38661d1c52dce9cdf84cdaf6ffca6fc20bca1adbdd050

See more details on using hashes here.

Provenance

File details

Details for the file codegpt_sdk-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: codegpt_sdk-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.12

File hashes

Hashes for codegpt_sdk-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bfb93460f8543cd6447f9ad1158c8fd174944702f4855af772987c07cdf624fe
MD5 48d74d377e468af7ab2732a842d4c8b1
BLAKE2b-256 8cb589cc9bec4f1c4c1cabdf22bb93ca06b31e3266a87341760f32a263e17e85

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page