Skip to main content

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 openai instalada (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

ajent-0.4.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ajent-0.4.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

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

Hashes for ajent-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6b271fecd145d2c1b3b0c55284544964fdc2d459c614db1977c7428545929067
MD5 94aa4d03897c66bfdf467f704c448348
BLAKE2b-256 7abaa47f596fa6bb4c7f5c2b6b5a6060d1a0eb7f61bb8df55d9164ed80ae4151

See more details on using hashes here.

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

Hashes for ajent-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41cd5825dd297c40f16f3b77ab882860136b1af19ab7a0e6e9db6e00583cef73
MD5 194e1a1988acdd485e9b9f9ef714472a
BLAKE2b-256 1a4aebbf9a891d1a66ff73a2983e74d678f491e3177aae8bdd27b2f4f8cd228f

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