#domain #service #shared #json #environment #data #integration-os

integrationos-domain

Shared library for IntegrationOS

17 releases (11 stable)

new 3.0.2 Apr 22, 2024
3.0.1 Apr 19, 2024
2.3.0 Apr 16, 2024
1.3.0 Apr 12, 2024
0.1.1 Mar 27, 2024

#27 in #shared

Download history 245/week @ 2024-03-21 388/week @ 2024-03-28 444/week @ 2024-04-04 795/week @ 2024-04-11 336/week @ 2024-04-18

2,047 downloads per month

GPL-3.0 license

410KB
11K SLoC

IntegrationOS Domain

This documentation does not aim to be an in-depth explanation of the code, but rather a high-level overview of the project. For a more detailed explanation, please refer to the code itself.

Overview

IntegrationOS domain seeks to hold the common data structures used on the integration-os repository. Along with these DS, it also has some utilities to create id and manipulate json as well as general purpose services.

Environment Variables

The following environment variables are introduced, not necessarily used, by this project:

  • REDIS_URL: The URL to connect to the Redis server. Default is redis://localhost:6379.

  • REDIS_QUEUE_NAME: The name of the queue to be used in the Redis server. Default is events.

  • REDIS_EVENT_THROUGHPUT_KEY: The key to be used to store the event throughput in the Redis server. Default is event_throughput.

  • REDIS_API_THROUGHPUT_KEY: The key to be used to store the API throughput in the Redis server. Default is api_throughput.

  • CLAUDE_URL: The URL to connect to the Claude server. Default is https://api.anthropic.com/v1/complete.

  • CLAUDE_ANTHROPIC_VERSION: The version of the Claude server. Default is 2023-06-01.

  • CLAUDE_API_KEY: The API key to connect to the Claude server.

  • CLAUDE_MODEL: The model to be used in the Claude server. Default is claude-2.0.

  • CLAUDE_MAX_TOKENS_TO_SAMPLE: The maximum number of tokens to sample in the Claude server. Default is 10000.

  • CLAUDE_STOP_SEQUENCES: The stop sequences to be used in the Claude server. Default is an empty string.

  • CLAUDE_TEMPERATURE: The temperature to be used in the Claude server. Default is 0.1.

  • CLAUDE_TOP_P: The top-p to be used in the Claude server. Default is 0.7.

  • CLAUDE_TOP_K: The top-k to be used in the Claude server. Default is 5.

  • CLAUDE_USER_ID: The user ID to be used in the Claude server. Default is internal-system.

  • CONTROL_DATABASE_URL: The URL to connect to the control database. Default is mongodb://localhost:27017.

  • CONTROL_DATABASE_NAME: The name of the control database. Default is database.

  • UDM_DATABASE_URL: The URL to connect to the UDM database. Default is mongodb://localhost:27017.

  • UDM_DATABASE_NAME: The name of the UDM database. Default is udm.

  • EVENT_DATABASE_URL: The URL to connect to the event database. Default is mongodb://localhost:27017.

  • EVENT_DATABASE_NAME: The name of the event database. Default is database.

  • CONTEXT_DATABASE_URL: The URL to connect to the context database. Default is mongodb://localhost:27017.

  • CONTEXT_DATABASE_NAME: The name of the context database. Default is database.

  • CONTEXT_COLLECTION_NAME: The name of the context collection

  • ENVIRONMENT: The environment in which the application is running. Default is development.

  • OPENAI_API_KEY: The API key to connect to the OpenAI server

  • SECRETS_SERVICE_BASE_URL: The base URL to connect to the secrets service. Default is https://secrets-service-development-b2nnzrt2eq-uk.a.run.app/.

  • SECRETS_SERVICE_GET_PATH: The path to get secrets in the secrets service. Default is v1/secrets/get/.

  • SECRETS_SERVICE_CREATE_PATH: The path to create secrets in the secrets service. Default is v1/secrets/create/.

  • WATCHDOG_EVENT_TIMEOUT: The event timeout to be used in the watchdog service. Default is 300.

  • WATCHDOG_POLL_DURATION: The poll duration to be used in the watchdog service. Default is 10.

Services

  • Caller Client: A client to make requests to external APIs. It is used to make requests to external APIs and return the response. It is used by the integration-os repository to make requests to external APIs.
  • Secrets Client: A client to interact with the secrets service. It is used to get and create secrets in the secrets service. It is used by the integration-os repository to get and create secrets.
  • Watchdog Client: A client to start and stop the watchdog service. It is used to start the watchdog service. It is used by the integration-os repository to start and stop the watchdog service.

Data Structures

Please refer to the code itself for a detailed explanation of the data structures.

Utilities

  • Hash Data: A utility to hash data. It is used to hash data and return the hash. It is used by the integration-os repository to hash data.

Dependencies

~127MB
~2.5M SLoC