Skip to main content

No project description provided

Project description

Welcome to Caravel

Human-in-the-loop Agentic AI for your OpenAPI specs. Built in asynchronous Python and BAML.

image

Getting Started

Installation

pip install <name, hopefully caravel-ai>

AI Assistant Speedrun

from caravel.assistant.Assistant import Assistant
from caravel.baml.baml_client.types import Context
from caravel.http.Client import Client
from caravel.parsing.Parser import Parser

BASE_URL="env" # will be replaced with the dotenv

assistant: Assistant = Assistant(
    # finish this!
    client=Client(
        base_url=BASE_URL,
        auth_headers={}, # will be filled w auth headers
        allowed_methods=['get', 'post', 'patch', 'delete']
    ),
    spec_file="samsara.json"
) # Assistant

output_msg: str = "How can I help you today?"

while True:
    print("----------------------------------------")
    print("Assistant:")
    print(output_msg)
    print("----------------------------------------")
    user_prompt = input("$ ")
    output_msg = await assistant.assistant_call(user_prompt)

Overview

Caravel projects have four main parts:

  1. The Parser The Parser is a class that provides utilities for operating on OpenAPI specification files. The Parser is used to convert the OpenAPI specifications into formats that make it workable with the Client and the Runner.
  2. The Runner The Runner is a class consisting of methods that perform legwork such as constructing API requests, checking the schema of requests, etc.
  3. The Client The Client is a class that is used to make HTTP requests to the API. Client functions recieve their parameters from the runner and return their results in JSON format or in human/LLM-readable text. In addition to the standard HTTP methods, the Client also allows users to add their own custom methods to the client.
  4. The CaravelRegistry The CaravelRegistry is a function registry class. This registry is what allows developers to call Caravel functions from their assistant. The CaravelRegistry is a singleton class.

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

caravel_ai-0.0.3.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

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

caravel_ai-0.0.3-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

Details for the file caravel_ai-0.0.3.tar.gz.

File metadata

  • Download URL: caravel_ai-0.0.3.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.11 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for caravel_ai-0.0.3.tar.gz
Algorithm Hash digest
SHA256 a65db1bef4696c990647171350a90c4bd2d5f0225f6278e035eb476702e644e2
MD5 796f06004b756e1959baec70e6a2c524
BLAKE2b-256 88d520b24a3ed92962e979f26e1c00731ee76a5fa72a902cbdb6e39e3b757c0a

See more details on using hashes here.

File details

Details for the file caravel_ai-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: caravel_ai-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 39.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.11 Linux/5.15.167.4-microsoft-standard-WSL2

File hashes

Hashes for caravel_ai-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 eeacc70f9a1f22560098451fb1ab22f85d7dd1657fde7fc836d39adb46e287f1
MD5 45eecbea89fbb93469bf56012e216e5d
BLAKE2b-256 9b2ec1661a36276835aba83e97edd93222a391e20a2ccdbde1a421ca55843fb1

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