Skip to main content

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 language_agent

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 dotenv import load_dotenv
from language_agent.prompt import agent_prompt

load_dotenv()

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

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

Please note that using Language-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

repository: https://github.com/Andi5986/language_agent

Metadata

Release files for language-agent 0.3

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

Source distribution (sdist)

Source distribution for language-agent 0.3
File Size Uploaded Provenance
language-agent-0.3.tar.gz 2.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for language-agent 0.3
File Interpreter ABI Platform
language_agent-0.3-py3-none-any.whl Python 3 none any Details

Total release size: 5.2 kB

Release files / language-agent-0.3.tar.gz

Download URL language-agent-0.3.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8075031cb6134f0bb2e2374feeadf54120be436ce520379a81691808a058c788
BLAKE2b-256 checksum
How to use checksums
3e446a7cceba4205f429f4d9002254042437a81a70bf17a6833883c9c539fd63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / language_agent-0.3-py3-none-any.whl

Download URL language_agent-0.3-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
93ca37047be2d7feaf38017f8294740ea05fed5b3caab309dcd92b9cc700154b
BLAKE2b-256 checksum
How to use checksums
940ab1c4518ea2dd49b7de8654b283e9e9cf2ba66075cc05092cc7bd6b0a8221
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Security for language-agent 0.3

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.

Release history Release notifications | RSS feed

This release

0.3 This release

2 release files No provenance

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