Library to implement your own Ajent Server API
Project description
Ajent
ajent é uma biblioteca open source para implementar agentes de IA em JavaScript, com suporte a comunicação com modelos de linguagem (LLMs) através de uma API centralizada. O objetivo do projeto é facilitar a integração de LLMs em aplicações frontend e backend, suportando ferramentas customizadas (tools) e serialização de respostas.
📚 Funcionalidades
- Suporte para múltiplos provedores de LLMs (atualmente OpenAI).
- Envio de mensagens com ferramentas customizadas (tools).
- Serialização robusta de respostas em formato JSON.
- Estrutura modular e extensível para suporte a outros provedores de LLMs no futuro.
🚀 Começando
Requisitos
- Python 3.8 ou superior.
- Biblioteca
openaiinstalada (para integração com OpenAI).
Instalação
Para utilizar essa biblioteca é necessário um pip install.
pip install ajent
🛠️ Como Usar
Configurando um cliente LLM
Use a classe LLMFactory para criar o cliente LLM com base no provedor escolhido.
O nome do LLM (e.g., "openai") e o token de autenticação (opcional) devem ser fornecidos.
from ajent import LLMFactory
llm_name = "openai"
llm_token = "sua-chave-de-api"
llm_client = LLMFactory.create_client(llm_name, llm_token)
response = llm_client.send(messages, tools, model="gpt-4o-mini")
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
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 ajent-0.4.0.tar.gz.
File metadata
- Download URL: ajent-0.4.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b271fecd145d2c1b3b0c55284544964fdc2d459c614db1977c7428545929067
|
|
| MD5 |
94aa4d03897c66bfdf467f704c448348
|
|
| BLAKE2b-256 |
7abaa47f596fa6bb4c7f5c2b6b5a6060d1a0eb7f61bb8df55d9164ed80ae4151
|
File details
Details for the file ajent-0.4.0-py3-none-any.whl.
File metadata
- Download URL: ajent-0.4.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41cd5825dd297c40f16f3b77ab882860136b1af19ab7a0e6e9db6e00583cef73
|
|
| MD5 |
194e1a1988acdd485e9b9f9ef714472a
|
|
| BLAKE2b-256 |
1a4aebbf9a891d1a66ff73a2983e74d678f491e3177aae8bdd27b2f4f8cd228f
|