{"id":38851083,"url":"https://github.com/ioniccommerce/ionic_langchain","last_synced_at":"2026-01-17T14:12:26.223Z","repository":{"id":200361692,"uuid":"703348424","full_name":"ioniccommerce/ionic_langchain","owner":"ioniccommerce","description":"Langchain Tool wrapped around Ionic SDK \u0026 OpenAPI Spec","archived":false,"fork":false,"pushed_at":"2024-01-27T20:42:14.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-01-27T22:40:16.091Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ioniccommerce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-10-11T04:43:18.000Z","updated_at":"2023-12-21T20:20:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"567d5f4b-726c-47eb-8ca0-8fbf686e13cd","html_url":"https://github.com/ioniccommerce/ionic_langchain","commit_stats":null,"previous_names":["ioniccommerce/ionic_langchain"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/ioniccommerce/ionic_langchain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioniccommerce%2Fionic_langchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioniccommerce%2Fionic_langchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioniccommerce%2Fionic_langchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioniccommerce%2Fionic_langchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ioniccommerce","download_url":"https://codeload.github.com/ioniccommerce/ionic_langchain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ioniccommerce%2Fionic_langchain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28509939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T14:12:26.143Z","updated_at":"2026-01-17T14:12:26.212Z","avatar_url":"https://github.com/ioniccommerce.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ionic Langchain\n\nIonic Langchain provides a wrapper around the Ionic Commerce's SDK for use as a `Tool` in a custom Langchain agent.  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\nThis tool requires at least `langchain@0.0.350` and can work with any greater patch release the `0.0.x` series.\n\nWe currently support python 3.8.10 and above, but if you need support for a lower version, please open an issue and we will add support.\n\nYou can install the package from PyPI using `pip`:\n\n```sh\npython3 -m pip install ionic-langchain\n```\n\nor `poetry`:\n\n```sh\npoetry add ionic-langchain\n```\n\n## Usage\n\n```python\nimport os\nfrom typing import List\n\nfrom ionic_langchain.tool import IonicTool\nfrom langchain.agents import AgentType, Tool\nfrom langchain.agents import initialize_agent\nfrom langchain.chat_models import ChatOpenAI\n\ntools =  [\n    IonicTool().tool(),\n    # your other tools,\n]\n\nagent = initialize_agent(\n    tools=tools,\n    llm=ChatOpenAI(openai_api_key=\"your_key_here\", temperature=0.7),\n    agent=AgentType.CHAT_ZERO_SHOT_REACT_DESCRIPTION,\n    handle_parsing_errors=True,\n    verbose=True,\n)\n\n\ninput = \"Where can I get tide pods\"\n\nagent.run(input=input)\n```\n\n_Please see the [langchain agent docs](https://python.langchain.com/docs/modules/agents/) for more details on how to build and run agents_\n\n### Customizing the SDK\n\n`ionic_langchain.tool.IonicTool`'s constructor accepts an instance of `ionic_langchain.tool.Ionic`, a wrapper around [our SDK](https://pypi.org/project/Ionic-API-SDK/).  `ionic_langchain.tool.Ionic`, in turn accepts an  instance of that SDK, so you can provide the tool with a custom configuration:\n\n```python\nimport os\nfrom ionic.sdk import Ionic as IonicSDK\nfrom ionic_langchain.tool import Ionic, IonicTool\n\n\nsdk = IonicSDK(api_key_header=os.environ.get(\"IONIC_API_KEY\"))\nionic = Ionic(sdk=sdk)\ntool = IonicTool(ionic=ionic).tool()\n```\n\n## Development\n\nComing soon. Please feel free to open an issue.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fioniccommerce%2Fionic_langchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fioniccommerce%2Fionic_langchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fioniccommerce%2Fionic_langchain/lists"}