Skip to main content

Publish new version to NPM

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

Apache-2.0

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)

Source distribution for ai-enterprise-agent 0.0.9
File Size Uploaded
ai_enterprise_agent-0.0.9.tar.gz 23.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ai-enterprise-agent 0.0.9
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

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