Skip to main content

No project description provided

Project description

Language-Agent

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

Lanuage-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 Lanuage-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.2.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.2-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: language-agent-0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 f406804a9bfe2c8e0d547a73c9c2f316b0776da9a4937d3b34eaf5bb374181b8
MD5 b3c2be21332f44f19c02d98942795883
BLAKE2b-256 0e26acedaf1996f46777248679421ba510f00a45f0af94f23c05ad300476aa02

See more details on using hashes here.

File details

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

File metadata

  • Download URL: language_agent-0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 114643b55ea94b8b098e88f066edfd3e17352fa07a47c9c194016bca2deb8fe7
MD5 f14bb363ea5f03c4d177298dd9be8c60
BLAKE2b-256 045d7080e52fce55e22515151bf9777c1bc6cded2e96474be685f43da61a6d7b

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