AI Agent
AI Agent simplifies the implementation and use of generative AI with LangChain, was inspired by the project autogen
Installation
Use the package manager pip to install AI Agent.
pip install ai_enterprise_agent
Usage
Simple use
import asyncio
from ai_enterprise_agent.agent import Agent
from ai_enterprise_agent.interface.settings import (CHAIN_TYPE, DATABASE_TYPE, DIALECT_TYPE,
LLM_TYPE, PROCESSING_TYPE, VECTOR_STORE_TYPE)
agent = Agent({
'processing_type': PROCESSING_TYPE.single,
'chains': [CHAIN_TYPE.simple_chain],
'model': {
"type": LLM_TYPE.azure,
"api_key": <api_key>,
"model": <model>,
"endpoint": <endpoint>,
"api_version": <api_version>,
"temperature": 0.0
},
"system": {
"system_message": ""
},
})
response = asyncio.run(
agent._call(
input={
"question": "Who's Leonardo Da Vinci?.",
"chat_thread_id": "<chat_thread_id>"
}
)
)
print(response)
Using with Orchestrator Mode
When using LLM with Orchestrator Mode the Agent finds the best way to answer the question in your base knowledge.
agent = Agent({
'processing_type': PROCESSING_TYPE.orchestrator,
'chains': [CHAIN_TYPE.simple_chain, CHAIN_TYPE.sql_chain],
'model': {
"type": LLM_TYPE.azure,
"api_key": <api_key>,
"model": <model>,
"endpoint": <endpoint>,
"api_version": <api_version>,
"temperature": 0.0
},
"database": {
"type": DIALECT_TYPE.postgres,
"host": <host>,
"port": <port>,
"username": <username>,
"password": <password>,
"database": <database>,
"includes_tables": ['table-1', 'table-2'],
},
"system": {
"system_message": ""
},
})
response = asyncio.run(
agent._call(
input={
"question": "How many employees there?",
"chat_thread_id": "<chat_thread_id>"
}
)
)
print(response)
Contributing
If you've ever wanted to contribute to open source, and a great cause, now is your chance!
See the contributing docs for more information
Contributors ✨
|
JP. Nobrega 💬 📖 👀 📢 |
Túlio César Gaio 💬 📖 👀 📢 |
License
Metadata
Release files for ai-enterprise-agent 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ai_enterprise_agent-0.0.9.tar.gz | 23.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ai_enterprise_agent-0.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 60.1 kB
Release files / ai_enterprise_agent-0.0.9.tar.gz
| Download URL | ai_enterprise_agent-0.0.9.tar.gz |
|---|---|
| Size | 23.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d7a38b337d89f30eadf5da48d292e399539c9b13d191e6e1d3216cdd5102c05
|
|
BLAKE2b-256 checksum How to use checksums |
29459162b9aebf72492c8385e27279967ff9071a03f7e90291dc3a43b4698b94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / ai_enterprise_agent-0.0.9-py3-none-any.whl
| Download URL | ai_enterprise_agent-0.0.9-py3-none-any.whl |
|---|---|
| Size | 36.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b773c399979016ca251a765e1021efc0d5ccbf4675ce149594d48337fb32d8f8
|
|
BLAKE2b-256 checksum How to use checksums |
b9928321cbc00090a338d174f5e95747f7c802879eed5380e3e85c66ebfbd52a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Security for ai-enterprise-agent 0.0.9
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.