Initialization

This section explains how to initialize the library after installation. It covers the initial setup steps, configuration options, and any necessary initializations to get started with the to

To initialize the Fi AI Client, you need to provide your api_key and secret_key, which are associated with your Fi AI account. Here is a step-by-step guide to help you get started:

1. Obtain Your API Keys:

When you create an account with Future aGI, a service keys are generated for you. This key, along with your Space Key, is essential for logging in and authenticating your actions.

2. Set Up Your Environment:

Ensure you have your API keys and other necessary configurations stored as environment variables for security and convenience. You can do this by adding the following lines to your shell configuration file (e.g., .bashrc or .zshrc):

export FI_API_KEY=your_api_key
export FI_SECRET_KEY=your_secret_key
export FI_API_URL="https://api.futureagi.com"

Then, reload your shell configuration:

source ~/.bashrc

3. Instrument Your Code:

If you are using the Future Agi Python client, you can initialize the client in your code as follows:

import os
from fi_client import Client

api_key = os.environ["FI_API_KEY"]
secret_key = os.environ["FI_SECRET_KEY"]
base_url = os.environ["FI_API_URL"]

client = Client(
    api_key=api_key,
    secret_key=secret_key,
    uri=base_url,
    max_workers=8,
    max_queue_bound=5000,
    timeout=200,
    additional_headers=None,
)

Here’s a breakdown of the parameters used to initialize the Fi Client:

Note: It is strongly suggested to store the API key and other sensitive information as secrets or environment variables to maintain security and prevent accidental exposure of your credentials.

Last updated