Skip to main content

LlamaIndex FunctionTool wrappers for the BuyWhere product catalog API

Project description

buywhere-llamaindex

LlamaIndex FunctionTool wrappers for the BuyWhere product catalog API — search, compare, and track prices across 40+ retailers in Southeast Asia and the US.

Installation

pip install buywhere-llamaindex

Quick Start

import os
from buywhere_llamaindex import create_buywhere_tools
from llama_index.core.agent import ReActAgent
from llama_index.llms.openai import OpenAI

os.environ["BUYWHERE_API_KEY"] = "bw_live_..."

tools = create_buywhere_tools()
agent = ReActAgent.from_tools(tools, llm=OpenAI(model="gpt-4o"), verbose=True)

response = agent.chat("Find me the cheapest wireless headphones in Singapore under SGD 100")
print(response)

Available Tools

Tool Description
search_products Full-text product search across all retailers
get_product Fetch a single product by ID
compare_prices Compare prices for a product across retailers
find_deals Discover products with the biggest discounts
browse_categories List all available product categories
get_category_products Get products within a specific category
get_deals Get the current deals feed

Configuration

Set the BUYWHERE_API_KEY environment variable, or pass it directly:

tools = create_buywhere_tools(api_key="bw_live_...", base_url="https://api.buywhere.ai")

Get your API key at buywhere.ai/api-keys.

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

buywhere_llamaindex-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

buywhere_llamaindex-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file buywhere_llamaindex-0.1.0.tar.gz.

File metadata

  • Download URL: buywhere_llamaindex-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for buywhere_llamaindex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6a34447ddf4a4dcebfc1e5e76a9879b8a9bbe5daa71a3920b0adc4205529d570
MD5 dff3a54908c8b83342732780dac0d538
BLAKE2b-256 ff988dc638c7d26ab94e326e00085d0cc5e1171f78e2b80b3ff2d88dfe88f230

See more details on using hashes here.

File details

Details for the file buywhere_llamaindex-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for buywhere_llamaindex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5242abdcb6632cd1958460302366e6b1d24f1e3dde6b11577c5f78dd96f893d4
MD5 d667ed3aa56efa418908ed7ea548c577
BLAKE2b-256 d1f9db72553f94757e038a7267983ae149575aaf725baa3c142b3fdd1b47fafd

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