Ryoma agent Documentation¶
Ryoma agent is an AI agent that runs on LLM (Large Language Model), and can be used to ask questions in natural language. Ryoma agent can also use tools (refer to Ryoma tool) to let agent to run on various data APIs such as Pandas, Pyarrow, Spark, Pytorch etc.
Models¶
Ryoma model providers are inspired by jupyter-ai-magic, and currently supported models are:
Provider |
Provider ID |
Environment variable(s) |
Python package(s) |
---|---|---|---|
AI21 |
|
|
|
Anthropic |
|
|
|
Anthropic (playground) |
|
|
|
Bedrock |
|
N/A |
|
Bedrock (playground) |
|
N/A |
|
Cohere |
|
|
|
ERNIE-Bot |
|
|
|
Gemini |
|
|
|
GPT4All |
|
N/A |
|
Hugging Face Hub |
|
|
|
NVIDIA |
|
|
|
OpenAI |
|
|
|
OpenAI (playground) |
|
|
|
SageMaker |
|
N/A |
|
Example¶
from ryoma_ai.agent.pandas import PandasAgent
import pandas as pd
df = pd.DataFrame({
'customer_id': [1, 2, 3, 4, 5],
'purchase_amount': [100, 200, 300, 400, 500]
})
sql_agent = PandasAgent(df, "gpt-3.5-turbo")
print(sql_agent.stream("I want to get the top customers which making the most purchases"))
Agents¶
Currently supported agents are: