Skip to main content

No project description provided

Project description

AI-Agent

AI-Agent is a Python package that allows for easy integration with OpenAI's GPT-4 model. The package provides a simple API to generate text completions given a user prompt.

AI-Agent is perfect for developers looking to utilize OpenAI's powerful language model in their applications without the need to directly interact with OpenAI's API.

Key Features

  • Simple API for text generation
  • Automatic handling of API keys through environment variables
  • Easily customizable user prompt and context

Installation

To install AI-Agent, you can use pip:

$$$ pip install $$$

Before using the package, you'll need to set your OpenAI API key in a .env file:

$$$ OPENAI_API_KEY='your-key-here' $$$

Make sure the .env file is in the root directory of your project.

Usage

Using AI-Agent is simple. Below is a sample code snippet:

from ai_agent.prompt import agent_prompt

def main():
    context = 'write the cotext i.e. you are a reviewer of an exam'
    user_input = 'Write your question to match the context'
    response = agent_prompt(context, user_input)
    print("Agent's response:", response)

if __name__ == "__main__":
    main()

In this example, the context and user input are combined and sent to OpenAI's GPT-4 model, which generates a text completion. The text completion is then printed to the console.

License

AI-Agent is licensed under the terms of the MIT License.

Please note that using AI-Agent requires an API key from OpenAI, which may be subject to additional terms of use. Users are responsible for securely managing their API keys by storing them in a .env file and not sharing or exposing them in public or unsecured areas

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

language-agent-0.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

language_agent-0.1-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file language-agent-0.1.tar.gz.

File metadata

  • Download URL: language-agent-0.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for language-agent-0.1.tar.gz
Algorithm Hash digest
SHA256 ce3a45a55dfa2966d915bcdfb2febdada39e8ed72957cd579922d85d79137324
MD5 ee99c1ca8e07df0ba9c0beb0439d92f7
BLAKE2b-256 67a0d5ed0a182f1732e12cb35cbf87c22b300cccdd085ba932848cf52a2e2e31

See more details on using hashes here.

File details

Details for the file language_agent-0.1-py3-none-any.whl.

File metadata

  • Download URL: language_agent-0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for language_agent-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8cea4380ef64c4b05762be9e6a8fa46f725b7187d3ffc10284586509f89baf5f
MD5 58ada125c6671d443fcbc2493a6593f6
BLAKE2b-256 84e37927663197fcb47d9de2ccc8c96341fc42929ea3ccefe221ce1ad04cd938

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