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.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: codegpt-sdk-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 82c1f2bd042b7fbc249cecdf2d629fa7e55a62dffb0d3bc884a35bd38d110a3f
MD5 59b8966b7170364e4dd915edd72bc814
BLAKE2b-256 e6a72ce5da62a6984af47ab2e1bb1b24c2215e828511e6cf15b0688d603fd3be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: codegpt_sdk-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7b0bd309ffc3ed16b3274d4f32e152f7c4961b25dbf8b93e00eabecd3376840e
MD5 c9c58e5fb623ce123d11f7de3eb27e08
BLAKE2b-256 ee39b22094253ecd450c7da0641aec4e2da2e0ec47ae3c5f71c0c10df01b45ff

See more details on using hashes here.

Supported by

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