Our logo
HomeDashboardLoginSign up

Documentation

install it in python with pip install Ornymo
How does it work:It checks cached results first, and if none exist, it invokes your agent and stores the new output.

Importing the SDK

from Ornymo import Ornymo

FastAPI Example

@app.post("/submit/query")
async def submit_query(user: user_dependency):
    # Initialize Ornymo SDK
    ornymo = Ornymo(
        apiKey="api_provider",
        history=user.history,
        query=user_dependency
    )

    # Check if the query exists in cache
    cached = await ornymo.query_check()

    if cached:
        return {"result": cached}

    # No cache found — invoke your agent
    response = agent.invoke("hey whats the weather")

    # Store the new response in cache
    await ornymo.caching(output=response)

    return {"result": response}