Skip to content
Open
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
8 changes: 4 additions & 4 deletions lib/llamaindex-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export class LlamaIndexService implements ILlamaIndexService {
private initializeIndexes(): void {

try {
// Extract hostname from LLAMACLOUD_API_URL for LlamaCloudIndex
// The SDK expects just the hostname (e.g., 'api.cloud.eu.llamaindex.ai')
const baseUrlHostname = new URL(env.get('LLAMACLOUD_API_URL')!).hostname;
// Extract base URL (with scheme) from LLAMACLOUD_API_URL for LlamaCloudIndex
// The SDK expects the full origin (e.g., 'https://api.cloud.eu.llamaindex.ai')
const baseUrlHostname = new URL(env.get('LLAMACLOUD_API_URL')!).origin;

console.log('Initializing LlamaCloud indexes with config:', this.config);
if (this.config.indexNames && this.config.indexNames.length > 0) {
Expand Down Expand Up @@ -176,4 +176,4 @@ export class LlamaIndexService implements ILlamaIndexService {
getConfig(): Readonly<LlamaIndexConfig> {
return { ...this.config };
}
}
}