Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ VECTOR_DB_ENABLED=false
# VECTOR_DB_TYPE=pinecone|weaviate|chroma
# VECTOR_DB_API_KEY=your-api-key
# VECTOR_DB_ENDPOINT=https://your-instance.vectordb.com

# OpenClaw Configuration (Optional)
# Set OPENCLAW_ENABLED=true to enable OpenClaw features
# OPENCLAW_ENABLED=false
# OPENCLAW_API_KEY=your-api-key
# SERVICE_BASE_URL_OPENCLAW=https://api.openclaw.com
13 changes: 13 additions & 0 deletions src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ export const ConfigSchema = z.object({
endpoint: z.string().url().optional(),
})
.optional(),

openClaw: z
.object({
enabled: z.coerce.boolean().default(false),
apiKey: z.string().optional(),
baseUrl: z.string().url().optional(),
})
.optional(),
});

export type Config = z.infer<typeof ConfigSchema>;
Expand Down Expand Up @@ -70,6 +78,11 @@ export function loadConfig(): Config {
apiKey: process.env.VECTOR_DB_API_KEY,
endpoint: process.env.VECTOR_DB_ENDPOINT,
},
openClaw: {
enabled: process.env.OPENCLAW_ENABLED,
apiKey: process.env.OPENCLAW_API_KEY,
baseUrl: process.env.SERVICE_BASE_URL_OPENCLAW,
},
};

// Parse and validate configuration
Expand Down