Configuration Guide

When using the bafcode setup command, your project will be auto-configured by default. However, there are a few custom configurations you might want to adjust.

1. Environment Configuration

.env File

This is where you define your environment-specific variables.

# OPENAI LLM API KeyOPENAI_API_KEY=

If you intend to use the OpenAI LLMs, which are set by BafCode by default, ensure that you populate your OpenAI key within the .env file.

2. Default LLM

BafCode has set OpenAILLM as the default LLM for both the Responder and Agent Components. If you wish to use a different LLM, execute the following command:

bafcode make llm <your_llm_name>

This creates an LLM file. If you prefer a custom or an open-source LLM, remember to adjust the DEFAULT_LLM value in config/llm_config.py:

import os
from dotenv import load_dotenv
load_dotenv()

# General configurations for all LLMs
class LLMsConfig:
    LLM_TIMEOUT = 15  # Timeout for LLM requests (in seconds)
    DEFAULT_LLM = "OpenAILLM"  # Use your generated LLM class name if changed

    # OpenAI LLM configurations
    OPENAI_API_KEY = os.getenv("OPENAI_API_KEY") 
    OPENAI_ENGINE = "gpt-3.5-turbo" 
    OPENAI_MAX_TOKENS = 150 

    # Example configurations for another LLM:
    # SOMEOTHERLLM_API_ENDPOINT = "https://someotherllmapi.example.com/generate"
    # SOMEOTHERLLM_AUTH_TOKEN = "YOUR_SOMEOTHERLLM_API_TOKEN"

3. Custom Configurations

You can find other configurations you might want to adjust within the config directory.

And there you have it! This encompasses the essential configurations you'll need to get started with BafCode.