Skip to main content

llama-index tools wolfram_alpha integration

Project description

Wolfram Alpha Tool

This tool connects to a Wolfram alpha account and allows an Agent to perform searches

You will need to provide an API key: https://products.wolframalpha.com/api

Usage

This tool has more extensive example usage documented in a Jupyter notebook here

Here's an example usage of the WolframAlphaToolSpec.

from llama_index.tools.wolfram_alpha import WolframAlphaToolSpec
from llama_index.agent.core.agent import FunctionAgent
from llama_index.llms.openai import OpenAI


wolfram_spec = WolframAlphaToolSpec(app_id="API-key")

agent = FunctionAgent(
    tools=wolfram_spec.to_tool_list(),
    llm=OpenAI(model="gpt-4.1"),
)

print(await agent.run("how many calories are in 100g of milk chocolate"))
print(await agent.run("what is the mass of the helium in the sun"))

wolfram_alpha_query: Get the result of a query from Wolfram Alpha

This loader is designed to be used as a way to load data as a Tool in a Agent.

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

llama_index_tools_wolfram_alpha-0.4.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file llama_index_tools_wolfram_alpha-0.4.0.tar.gz.

File metadata

File hashes

Hashes for llama_index_tools_wolfram_alpha-0.4.0.tar.gz
Algorithm Hash digest
SHA256 7eafcffeec657c5ae2bca0810ded49d17ca10b861d61879acf17b17514eeaab8
MD5 be6f6c64fb3c19d2f404be98eea80e6d
BLAKE2b-256 97cebcfa24dbe3b4ab6b07f6a89060f63afb60cd2a73ea5b671cd8bf80ce42df

See more details on using hashes here.

File details

Details for the file llama_index_tools_wolfram_alpha-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_tools_wolfram_alpha-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a8450c47ead5ab4f3c6da88edb7378fe3d96c63101894ef1ba483674286b842
MD5 02447bd005a3a68785f4e64bede82b5f
BLAKE2b-256 6a73f4751a12aeb54cdac8d58a336e795439892a9b5723292c87c79e88142b3a

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