ai-enterprise-agent


Nameai-enterprise-agent JSON
Version 0.0.9 PyPI version JSON
download
home_pageNone
SummaryAI Agent simplifies the implementation and use of generative AI with LangChain.
upload_time2024-04-30 17:37:01
maintainerNone
docs_urlNone
authorAuthor
requires_python>=3.9
licenseApache 2.0 License
keywords ai ai-agent agent assistant enterprise
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
[![Publish new version to NPM](https://github.com/dev-jpnobrega/ai-agent/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/dev-jpnobrega/ai-agent/actions/workflows/npm-publish.yml)

# AI Agent

AI Agent simplifies the implementation and use of generative AI with LangChain, was inspired by the project [autogen](https://github.com/microsoft/autogen)



## Installation

Use the package manager [pip](https://pypi.org/project/pip/) to install AI Agent.

```bash
pip install ai_enterprise_agent
```

## Usage

### Simple use
```python
  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.
```python

  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](CONTRIBUTING.md) for more information

## Contributors ✨

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->

<table>
  <tr>
    <td align="center">
      <a href="https://github.com/dev-jpnobrega">
        <img src="https://avatars1.githubusercontent.com/u/28389807?s=400&u=2c152fc946efc96badce0cfc743ebcb2585b4b3f&v=4" width="100px;" alt=""/>
        <br />
        <sub>
          <b>JP. Nobrega</b>
        </sub>
      </a>
      <br />
      <a href="https://github.com/dev-jpnobrega/ai-agent-py/issues" title="Answering Questions">πŸ’¬</a>
      <a href="https://github.com/dev-jpnobrega/ai-agent-py/master#how-do-i-use" title="Documentation">πŸ“–</a>
      <a href="https://github.com/dev-jpnobrega/ai-agent-py/pulls" title="Reviewed Pull Requests">πŸ‘€</a>
      <a href="#talk-kentcdodds" title="Talks">πŸ“’</a>
    </td>
    <td align="center">
      <a href="https://github.com/tuliogaio">
        <img src="https://github.com/tuliogaio.png" width="100px;" alt=""/>
        <br />
        <sub>
          <b>TΓΊlio CΓ©sar Gaio</b>
        </sub>
      </a>
      <br />
      <a href="https://github.com/dev-jpnobrega/ai-agent-py/issues" title="Answering Questions">πŸ’¬</a>
      <a href="https://github.com/dev-jpnobrega/ai-agent-py/master#how-do-i-use" title="Documentation">πŸ“–</a>
      <a href="https://github.com/dev-jpnobrega/ai-agent-py/pulls" title="Reviewed Pull Requests">πŸ‘€</a>
      <a href="#talk-kentcdodds" title="Talks">πŸ“’</a>
    </td>
  </tr>
</table>

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->

## License
[Apache-2.0](LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ai-enterprise-agent",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "ai ai-agent agent assistant enterprise",
    "author": "Author",
    "author_email": "autor@autor.com.br",
    "download_url": "https://files.pythonhosted.org/packages/29/45/9162b9aebf72492c8385e27279967ff9071a03f7e90291dc3a43b4698b94/ai_enterprise_agent-0.0.9.tar.gz",
    "platform": null,
    "description": "\n[![Publish new version to NPM](https://github.com/dev-jpnobrega/ai-agent/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/dev-jpnobrega/ai-agent/actions/workflows/npm-publish.yml)\n\n# AI Agent\n\nAI Agent simplifies the implementation and use of generative AI with LangChain, was inspired by the project [autogen](https://github.com/microsoft/autogen)\n\n\n\n## Installation\n\nUse the package manager [pip](https://pypi.org/project/pip/) to install AI Agent.\n\n```bash\npip install ai_enterprise_agent\n```\n\n## Usage\n\n### Simple use\n```python\n  import asyncio\n\n  from ai_enterprise_agent.agent import Agent\n  from ai_enterprise_agent.interface.settings import (CHAIN_TYPE, DATABASE_TYPE, DIALECT_TYPE,\n                                  LLM_TYPE, PROCESSING_TYPE, VECTOR_STORE_TYPE)\n  agent = Agent({\n    'processing_type': PROCESSING_TYPE.single,\n    'chains': [CHAIN_TYPE.simple_chain],\n    'model': {\n      \"type\": LLM_TYPE.azure,\n      \"api_key\": <api_key>,\n      \"model\": <model>,\n      \"endpoint\": <endpoint>,\n      \"api_version\": <api_version>,\n      \"temperature\": 0.0\n    },\n    \"system\": {\n      \"system_message\": \"\"\n    },\n  })\n\n  response = asyncio.run(\n    agent._call(\n      input={\n        \"question\": \"Who's Leonardo Da Vinci?.\",\n        \"chat_thread_id\": \"<chat_thread_id>\"\n      }\n    )\n  )\n  print(response)\n```\n\n### Using with Orchestrator Mode\nWhen using LLM with Orchestrator Mode the Agent finds the best way to answer the question in your base knowledge.\n```python\n\n  agent = Agent({\n    'processing_type': PROCESSING_TYPE.orchestrator,\n    'chains': [CHAIN_TYPE.simple_chain, CHAIN_TYPE.sql_chain],\n    'model': {\n      \"type\": LLM_TYPE.azure,\n      \"api_key\": <api_key>,\n      \"model\": <model>,\n      \"endpoint\": <endpoint>,\n      \"api_version\": <api_version>,\n      \"temperature\": 0.0\n    },\n     \"database\": {\n      \"type\": DIALECT_TYPE.postgres,\n      \"host\": <host>,\n      \"port\": <port>,\n      \"username\": <username>,\n      \"password\": <password>,\n      \"database\": <database>,\n      \"includes_tables\": ['table-1', 'table-2'],\n    },\n    \"system\": {\n      \"system_message\": \"\"\n    },\n  })\n\n  response = asyncio.run(\n    agent._call(\n      input={\n        \"question\": \"How many employees there?\",\n        \"chat_thread_id\": \"<chat_thread_id>\"\n      }\n    )\n  )\n  print(response)\n```\n\n## Contributing\n\nIf you've ever wanted to contribute to open source, and a great cause, now is your chance!\n\nSee the [contributing docs](CONTRIBUTING.md) for more information\n\n## Contributors \u2728\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n\n<table>\n  <tr>\n    <td align=\"center\">\n      <a href=\"https://github.com/dev-jpnobrega\">\n        <img src=\"https://avatars1.githubusercontent.com/u/28389807?s=400&u=2c152fc946efc96badce0cfc743ebcb2585b4b3f&v=4\" width=\"100px;\" alt=\"\"/>\n        <br />\n        <sub>\n          <b>JP. Nobrega</b>\n        </sub>\n      </a>\n      <br />\n      <a href=\"https://github.com/dev-jpnobrega/ai-agent-py/issues\" title=\"Answering Questions\">\ud83d\udcac</a>\n      <a href=\"https://github.com/dev-jpnobrega/ai-agent-py/master#how-do-i-use\" title=\"Documentation\">\ud83d\udcd6</a>\n      <a href=\"https://github.com/dev-jpnobrega/ai-agent-py/pulls\" title=\"Reviewed Pull Requests\">\ud83d\udc40</a>\n      <a href=\"#talk-kentcdodds\" title=\"Talks\">\ud83d\udce2</a>\n    </td>\n    <td align=\"center\">\n      <a href=\"https://github.com/tuliogaio\">\n        <img src=\"https://github.com/tuliogaio.png\" width=\"100px;\" alt=\"\"/>\n        <br />\n        <sub>\n          <b>T\u00falio C\u00e9sar Gaio</b>\n        </sub>\n      </a>\n      <br />\n      <a href=\"https://github.com/dev-jpnobrega/ai-agent-py/issues\" title=\"Answering Questions\">\ud83d\udcac</a>\n      <a href=\"https://github.com/dev-jpnobrega/ai-agent-py/master#how-do-i-use\" title=\"Documentation\">\ud83d\udcd6</a>\n      <a href=\"https://github.com/dev-jpnobrega/ai-agent-py/pulls\" title=\"Reviewed Pull Requests\">\ud83d\udc40</a>\n      <a href=\"#talk-kentcdodds\" title=\"Talks\">\ud83d\udce2</a>\n    </td>\n  </tr>\n</table>\n\n<!-- markdownlint-enable -->\n<!-- prettier-ignore-end -->\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\n## License\n[Apache-2.0](LICENSE)\n",
    "bugtrack_url": null,
    "license": "Apache 2.0 License",
    "summary": "AI Agent simplifies the implementation and use of generative AI with LangChain.",
    "version": "0.0.9",
    "project_urls": null,
    "split_keywords": [
        "ai",
        "ai-agent",
        "agent",
        "assistant",
        "enterprise"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b9928321cbc00090a338d174f5e95747f7c802879eed5380e3e85c66ebfbd52a",
                "md5": "bcad18eb5d245ef02e0d8ff488ff6071",
                "sha256": "b773c399979016ca251a765e1021efc0d5ccbf4675ce149594d48337fb32d8f8"
            },
            "downloads": -1,
            "filename": "ai_enterprise_agent-0.0.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bcad18eb5d245ef02e0d8ff488ff6071",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 36364,
            "upload_time": "2024-04-30T17:36:58",
            "upload_time_iso_8601": "2024-04-30T17:36:58.840643Z",
            "url": "https://files.pythonhosted.org/packages/b9/92/8321cbc00090a338d174f5e95747f7c802879eed5380e3e85c66ebfbd52a/ai_enterprise_agent-0.0.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "29459162b9aebf72492c8385e27279967ff9071a03f7e90291dc3a43b4698b94",
                "md5": "b34808d9f26beceddaee5f974f04933d",
                "sha256": "0d7a38b337d89f30eadf5da48d292e399539c9b13d191e6e1d3216cdd5102c05"
            },
            "downloads": -1,
            "filename": "ai_enterprise_agent-0.0.9.tar.gz",
            "has_sig": false,
            "md5_digest": "b34808d9f26beceddaee5f974f04933d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 23758,
            "upload_time": "2024-04-30T17:37:01",
            "upload_time_iso_8601": "2024-04-30T17:37:01.307781Z",
            "url": "https://files.pythonhosted.org/packages/29/45/9162b9aebf72492c8385e27279967ff9071a03f7e90291dc3a43b4698b94/ai_enterprise_agent-0.0.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-30 17:37:01",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ai-enterprise-agent"
}
        
Elapsed time: 0.24202s