Chatbot SDK - Configuration

Configuration Reference

Every config.ini option and environment variable the SDK reads, with types, defaults, and whether each is required.

config.ini - safe to commit.env - never commit

mapper_config.ini

mapper_config.ini Sections

Generated by pdf-autofillr setup at configs/mapper_config.ini. Safe to commit — contains no secrets. Controls the mapper module's LLM, chunking, cloud storage, and RAG integration.

[core]
OptionTypeDefaultDescription
modeenumserverserver | cli | lambda | embed | library
storageenumlocallocal | s3 - session storage backend
edit_modebooleanfalseManaged by chatbot-setup wizard. Do not change manually.
[storage_local]
OptionTypeDefaultDescription
data_pathstring./chatbot_dataDirectory where session JSON files are written. Created automatically.
config_pathstring./configsDirectory containing form config JSON files.
[storage_s3]
OptionTypeDefaultDescription
output_bucketstring(none)S3 bucket for session and output data (read/write).
config_bucketstring(none)S3 bucket for form config JSONs (read-only).
regionstringus-east-1AWS region for both buckets.
[pdf_filler]
OptionTypeDefaultDescription
enabledbooleanfalseSet to true to enable PDF filling after conversation completes.
providerenummappermapper | managed | custom - which fill service to use.
pdf_pathstring(none)Path or S3 key to blank PDF. Required when enabled = true.
[mapper]
OptionTypeDefaultDescription
api_urlstringhttp://localhost:8000Base URL of the mapper service.
url_prefixstring/mapperURL prefix. Use empty string for bare fastapi_app.py.
[telemetry]
OptionTypeDefaultDescription
modeenumlocallocal | managed - where telemetry events are sent.
[server]
OptionTypeDefaultDescription
portinteger8001Server port. Overridden by PORT environment variable if set.
hoststring0.0.0.0Bind address. Use 127.0.0.1 to restrict to localhost.
workersinteger1Uvicorn worker count. Increase for production traffic.

.env

Environment Variables

Create from the example: cp .env.example .env. Never commit this file - it contains all secrets.

Core
VariableRequired?DefaultDescription
OPENAI_API_KEYALWAYS-OpenAI API key (sk-…). Required in every deployment mode.
chatbot_STORAGEOptionallocallocal or s3 - session storage backend.
chatbot_DATA_PATHOptional./chatbot_dataLocal session data directory.
chatbot_CONFIG_PATHOptional./configsForm config JSON directory.
PORTOptional8001API server port (overrides config.ini server.port).
chatbot_BOT_NAMEOptionalBotBot display name used in greeting and responses.
chatbot_GREETINGOptional(built-in)Opening message text sent on empty first turn.
chatbot_DEBUG_LOGGINGOptionalfalseSet to true for verbose debug logs.
chatbot_LOG_LEVELOptionalINFOLog level: DEBUG, INFO, WARNING, ERROR.
S3 Storage (if chatbot_STORAGE = s3)
VariableRequired?DefaultDescription
AWS_OUTPUT_BUCKETIf storage=s3-S3 bucket for session data (read/write).
AWS_CONFIG_BUCKETIf storage=s3-S3 bucket for config JSONs (read-only).
AWS_REGIONIf storage=s3us-east-1AWS region for both buckets.
AWS_ACCESS_KEY_IDIf storage=s3-AWS access key. Use IAM role instead if possible.
AWS_SECRET_ACCESS_KEYIf storage=s3-AWS secret key. Use IAM role instead if possible.
AWS_PROFILEOptional-Named AWS profile (alternative to key/secret).
PDF Filling - Mapper Mode
VariableRequired?DefaultDescription
chatbot_PDF_FILLEROptionalnonenone | mapper | managed - PDF filling mode.
chatbot_PDF_PATHIf PDF filler on-Path or S3 key to blank PDF.
MAPPER_API_URLIf provider=mapperhttp://localhost:8000Base URL of the mapper service.
MAPPER_URL_PREFIXIf provider=mapper/mapperURL prefix for mapper routes.
MAPPER_API_KEYIf provider=mapper(blank)Mapper API key. Leave blank if mapper has no auth.
PDF Filling - Managed Mode
VariableRequired?DefaultDescription
AUTH0_DOMAINIf provider=managed-Auth0 tenant domain (your-tenant.us.auth0.com).
AUTH0_CLIENT_IDIf provider=managed-Auth0 M2M application client ID.
AUTH0_CLIENT_SECRETIf provider=managed-Auth0 M2M application client secret.
AUTH0_AUDIENCEIf provider=managed-Auth0 API audience URL.
FILL_PDF_LAMBDA_URLIf provider=managed-Lambda function URL for PDF filling.
PDF_API_KEYIf provider=managed-Lambda API key.
PDF Workflow Timing
VariableRequired?DefaultDescription
chatbot_PDF_POLL_INTERVALOptional10Seconds between fill readiness check polls.
chatbot_PDF_POLL_TIMEOUTOptional150Maximum total seconds to wait for PDF readiness.
chatbot_PDF_MAX_RETRIESOptional3Number of fill_document() retry attempts on failure.
Rate Limiting
VariableRequired?DefaultDescription
chatbot_RATE_LIMIT_ENABLEDOptionalfalseSet to true to enable rate limiting.
chatbot_RATE_LIMIT_STORAGEOptionallocallocal (in-memory) or redis.
REDIS_URLIf rate limit + redisredis://localhost:6379Redis connection URL for distributed rate limiting.
Telemetry
VariableRequired?DefaultDescription
chatbot_TELEMETRYOptionalfalseSet to true to enable telemetry.
chatbot_TELEMETRY_MODEOptionallocallocal | self_hosted | managed.
TELEMETRY_ENDPOINTIf mode=local-Your HTTP event receiver URL.
chatbot_SDK_API_KEYIf mode=managed-Managed telemetry key (chatbot_tel_…).
Doc Upload Module
VariableRequired?DefaultDescription
DOC_UPLOAD_LLM_MODELALWAYSopenai/gpt-4.1-miniLiteLLM model string for field extraction from uploaded documents.
DOC_UPLOAD_PDF_FILLEROptionalnonenone | mapper — PDF filling mode for doc_upload module.
DOC_UPLOAD_PDF_PATHIf filler=mapper-Path to blank PDF form used by doc_upload for filling.
Mapper Module
VariableRequired?DefaultDescription
MAPPER_API_URLOptional(empty)Leave empty for inprocess mode. Set to http://localhost:8002 for HTTP mode.
RAG_API_URLOptional(empty)RAG service URL. Leave empty for inprocess mode. Set for HTTP mode.
RAG Module
VariableRequired?DefaultDescription
RAG_ENABLEDOptionalfalseSet to true to enable RAG predictions. Must match mapper_config.ini [rag] enabled.
RAG_MODEOptionalinprocessinprocess | http — how the RAG module is accessed.
RAGPDF_EMBEDDING_BACKENDIf RAG onopenaiopenai | sentence_transformer — embedding model backend.
RAGPDF_OPENAI_EMBEDDING_MODELIf openaitext-embedding-3-smallOpenAI embedding model. Must match the bundled vector database.
RAGPDF_VECTOR_STOREOptionallocallocal — vector database location (cloud backends in future).
RAGPDF_DATA_PATHOptional./data/ragDirectory for RAG vectors, predictions, and metrics.
RAGPDF_CORRECTOR_BACKENDOptionalnoopnoop | default — post-prediction correction strategy.
System
VariableRequired?DefaultDescription
LITELLM_LOGOptionalINFOSet to ERROR to suppress LiteLLM verbose output in terminal.
PYTHONUTF8Optional0Set to 1 on Windows to prevent encoding errors in PDF text extraction.

Next in Chatbot SDK Reference

Python Library APIchatbotClient method signatures, return types, and storage interfaces.
View reference
Was this page helpful?
PDFFILLR.AI logo

PDFFILLR.AI

The intelligent layer for modern fund
administration. Automating high-stakes
documentation with precision and speed.

Powered byEngineersMind