ionic-haystack


Nameionic-haystack JSON
Version 0.1.6 PyPI version JSON
download
home_page
SummaryIonic Commerce tool for Haystack
upload_time2024-02-07 21:35:38
maintainer
docs_urlNone
authorYour Name
requires_python>=3.8,<4.0
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Ionic Commerce tool for Haystack

Ionic Haystack provides an Agent Tool integration to Ionic Commerce. This tool will enable e-commerce for your agent , allowing your users to ask for product recommendations and purchase products through the agent chat interface.

## Installation

You can install the package from PyPI using `pip`:
```sh
python3 -m pip install ionic-haystack
```

or `poetry`:

```sh
poetry add ionic-haystack
```

## Usage
Get started quickly using Ionic Commerce with Haystack by creating an IonicShoppingTool and adding it to your agent's tools.
```python
import os
from haystack.agents import Tool
from haystack.agents.conversational import ConversationalAgent
from haystack.agents.memory import ConversationMemory
from haystack.nodes import PromptNode

from ionic_haystack.prompt_templates import ionic_template
from ionic_haystack.tool import IonicShoppingTool

ionic_node = IonicShoppingTool(api_key="my_ionic_api_key")
ionic_tool = Tool(
    name="Ionic",
    pipeline_or_node=ionic_node,
    description=ionic_template
)

memory = ConversationMemory()
prompt_node = PromptNode("gpt-3.5-turbo", api_key=os.getenv("OPENAI_API_KEY") , max_length=256, stop_words=["Observation:"])
agent = ConversationalAgent(prompt_node, tools=[ionic_tool],  memory=memory, prompt_template="deepset/conversational-agent")
```

## Examples
- Example Ionic Agent: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ioniccommerce/ionic_haystack/blob/main/examples/example_ionic_agent.ipynb)
            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ionic-haystack",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Your Name",
    "author_email": "you@example.com",
    "download_url": "https://files.pythonhosted.org/packages/e2/6a/342dc50cddc64de9c9ce1cb53bc5f7ff945d03f9cfdb24e1c6261c385e55/ionic_haystack-0.1.6.tar.gz",
    "platform": null,
    "description": "# Ionic Commerce tool for Haystack\n\nIonic Haystack provides an Agent Tool integration to Ionic Commerce. This tool will enable e-commerce for your agent , allowing your users to ask for product recommendations and purchase products through the agent chat interface.\n\n## Installation\n\nYou can install the package from PyPI using `pip`:\n```sh\npython3 -m pip install ionic-haystack\n```\n\nor `poetry`:\n\n```sh\npoetry add ionic-haystack\n```\n\n## Usage\nGet started quickly using Ionic Commerce with Haystack by creating an IonicShoppingTool and adding it to your agent's tools.\n```python\nimport os\nfrom haystack.agents import Tool\nfrom haystack.agents.conversational import ConversationalAgent\nfrom haystack.agents.memory import ConversationMemory\nfrom haystack.nodes import PromptNode\n\nfrom ionic_haystack.prompt_templates import ionic_template\nfrom ionic_haystack.tool import IonicShoppingTool\n\nionic_node = IonicShoppingTool(api_key=\"my_ionic_api_key\")\nionic_tool = Tool(\n    name=\"Ionic\",\n    pipeline_or_node=ionic_node,\n    description=ionic_template\n)\n\nmemory = ConversationMemory()\nprompt_node = PromptNode(\"gpt-3.5-turbo\", api_key=os.getenv(\"OPENAI_API_KEY\") , max_length=256, stop_words=[\"Observation:\"])\nagent = ConversationalAgent(prompt_node, tools=[ionic_tool],  memory=memory, prompt_template=\"deepset/conversational-agent\")\n```\n\n## Examples\n- Example Ionic Agent: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/ioniccommerce/ionic_haystack/blob/main/examples/example_ionic_agent.ipynb)",
    "bugtrack_url": null,
    "license": "",
    "summary": "Ionic Commerce tool for Haystack",
    "version": "0.1.6",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "167601038b27e49852c1b8c91e3e889f372dd3bd6d90ff304ec9535817f07e10",
                "md5": "5e465bf9ab528c1747b14701da660e28",
                "sha256": "7089c04ad0edd27f542c8e18cece39c6ac7d49ab09f4d6105c24f62925eb3958"
            },
            "downloads": -1,
            "filename": "ionic_haystack-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5e465bf9ab528c1747b14701da660e28",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 5216,
            "upload_time": "2024-02-07T21:35:37",
            "upload_time_iso_8601": "2024-02-07T21:35:37.143643Z",
            "url": "https://files.pythonhosted.org/packages/16/76/01038b27e49852c1b8c91e3e889f372dd3bd6d90ff304ec9535817f07e10/ionic_haystack-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e26a342dc50cddc64de9c9ce1cb53bc5f7ff945d03f9cfdb24e1c6261c385e55",
                "md5": "d730b1e6c93c06cb0e933c54cc8fbe85",
                "sha256": "634536a929d855a0c6dbab67c2e822e0323610025c06d4bb8ca1a65b5389e452"
            },
            "downloads": -1,
            "filename": "ionic_haystack-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "d730b1e6c93c06cb0e933c54cc8fbe85",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 3656,
            "upload_time": "2024-02-07T21:35:38",
            "upload_time_iso_8601": "2024-02-07T21:35:38.899052Z",
            "url": "https://files.pythonhosted.org/packages/e2/6a/342dc50cddc64de9c9ce1cb53bc5f7ff945d03f9cfdb24e1c6261c385e55/ionic_haystack-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-07 21:35:38",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "ionic-haystack"
}
        
Elapsed time: 0.38460s