Skip to main content

API Server for Rustic AI

Project description

Rustic AI API

This module provides the backend server for the Rustic AI framework. It provides the interface for creating and interacting with guilds. The interaction with a guild is supported through a Websocket interface, allowing for real-time communication and updates.

Installing

pip install rusticai-api

Note: It depends on rusticai-core and rusticai-ray.

Running from source

  1. Install required dependencies:
poetry install --with dev
poetry shell
  1. Start the server:
# If using an external SQL database, expose RUSTIC_METASTORE to the corresponding url 
# For example, if using postgres, export RUSTIC_METASTORE=postgresql+psycopg://user:pwd@localhost:5432
./scripts/dev_server.sh

Server will be available at http://localhost:8880 by default. The API documentation can be accessed at http://localhost:8880/docs.

Running from source with Telemetry

  1. Install required dependencies:
poetry install --with dev
poetry shell
  1. Start Zipkin server - requires Docker
sudo chmod 777 scripts/zipkin/data-tmp/
./scripts/zipkin/zipkin_up.sh
  1. Set the otel env variables -
export OTEL_SERVICE_NAME=GuildCommunicationService
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="http://localhost:4318/v1/traces"
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"

Refer docs for details.

  1. Start the server -
./scripts/dev_server_with_otel.sh

Traces will be visible in Zipkin UI at http://localhost:9411/zipkin/

Note: To stop the Zipkin server, use ./scripts/zipkin/zipkin_down.sh

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

rusticai_api-0.0.5.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

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

rusticai_api-0.0.5-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

File details

Details for the file rusticai_api-0.0.5.tar.gz.

File metadata

  • Download URL: rusticai_api-0.0.5.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.10 Linux/6.14.4-300.fc42.x86_64

File hashes

Hashes for rusticai_api-0.0.5.tar.gz
Algorithm Hash digest
SHA256 ec818aba261497e54c18ed9755299113553fb5faec704a98b978739ff7b49532
MD5 526d21bdf324c40e070a8061447b9c93
BLAKE2b-256 58c4298b30386e97f7eed42cb4c721d3b5cb02dabd451f67aaf58829d2c46506

See more details on using hashes here.

File details

Details for the file rusticai_api-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: rusticai_api-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 27.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.10 Linux/6.14.4-300.fc42.x86_64

File hashes

Hashes for rusticai_api-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0d9a154e0baebb5b263ee2bea4e9b1cecf5a87f256959d54474bbe1619a0faa7
MD5 39ef1e3b4fa36a5783237aa7ef44fd8f
BLAKE2b-256 6ce3167a9937397dd178040422ed950cefde9e69cb2961c8222499e5c097276d

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