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 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file language-agent-0.3.tar.gz.
File metadata
- Download URL: language-agent-0.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8075031cb6134f0bb2e2374feeadf54120be436ce520379a81691808a058c788
|
|
| MD5 |
14b90caf5f77be09ff2197b86233a0a9
|
|
| BLAKE2b-256 |
3e446a7cceba4205f429f4d9002254042437a81a70bf17a6833883c9c539fd63
|
File details
Details for the file language_agent-0.3-py3-none-any.whl.
File metadata
- Download URL: language_agent-0.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93ca37047be2d7feaf38017f8294740ea05fed5b3caab309dcd92b9cc700154b
|
|
| MD5 |
82fb65dd37adec95fc1ccc39d9c01547
|
|
| BLAKE2b-256 |
940ab1c4518ea2dd49b7de8654b283e9e9cf2ba66075cc05092cc7bd6b0a8221
|