How to Get Started with the RyomaAI Powered Data Agent Framework

Category :

The RyomaAI Powered Data Agent framework is your ultimate companion for data analysis, engineering, and visualization, making complex tasks straightforward. In this article, we’ll guide you through the installation and basic usage of this powerful tool, ensuring you can tap into its full potential.

Installation

Starting with RyomaAI is easy. Simply install the package using pip. You can choose a standard installation or one with extra dependencies for added features.

  • Standard Installation:
    pip install ryoma_ai
  • Installation with extra dependencies (e.g., Snowflake):
    pip install ryoma_ai[snowflake]

Basic Example of Using SqlAgent

Now, let’s look at a basic example of connecting to a PostgreSQL database using the SqlAgent. Think of the SqlAgent as a smart assistant in a library, ready to fetch any book (data) you need based on your requests.

Here’s how you can implement it:

from ryoma_ai.agent.sql import SqlAgent
from ryoma_ai.datasource.postgres import PostgresDataSource

# Connect to a Postgres catalog
datasource = PostgresDataSource("postgresql:user:password@localhost:5432/dbname")

# Create a SQL agent
sql_agent = SqlAgent("gpt-3.5-turbo").add_datasource(datasource)

# Ask a question to the agent
sql_agent.stream("I want to get the top 5 customers which making the most purchases", display=True)

In this analogy, connecting to the data source is like opening a section of the library. You’re asking the assistant to retrieve the top 5 customers based on their purchases, and the assistant will generate (execute) the necessary query for you to access that information efficiently.

Using Ryoma Lab

Ryoma Lab offers a user-friendly interface to interact with your data and AI models. It’s like having a digital control center at your fingertips!

  1. Create a configuration file called rxconfig.py in your project:
  2. import logging
    import reflex as rx
    from reflex.constants import LogLevel
    
    config = rx.Config(
        app_name="ryoma_lab",
        loglevel=LogLevel.INFO,
    )
    
    # Setup basic configuration for logging
    logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
  3. Start Ryoma Lab with the following command:
  4. ryoma_lab run
  5. Your Ryoma Lab will be accessible at http://localhost:3000.
Ryoma Lab UI

Troubleshooting

Like any digital tool, you may encounter issues along the way. Here are some common troubleshooting tips:

  • Ensure you have the correct database connection URL in your string.
  • Check that all necessary dependencies are installed.
  • If you encounter errors while running commands, refer to the logs for more specific error messages.

For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.

Supported Models and Data Sources

RyomaAI supports various models and data sources to ensure versatility:

  • Models: AI21, Anthropic, OpenAI, Cohere, and many more.
  • Data Sources: Support for Snowflake, Sqlite, BigQuery, Postgres, and more.

At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

Conclusion

With the RyomaAI Powered Data Agent framework, you now have a powerful tool for data analysis and interaction. Dive in and make your data work for you!

Stay Informed with the Newest F(x) Insights and Blogs

Tech News and Blog Highlights, Straight to Your Inbox

Latest Insights

© 2024 All Rights Reserved

×