Adam Harkus
Adam Harkus

Reputation: 2210

CAP LLM Plugin needs cds.connect.to('db')

I've installed the CAP LLM Plugin (v.1.3.3).

However, for the getRagResponse() and similaritySearch() methods, the db is not connected, even if I set it in the calling script.

For now, I've put in the workaround to the plugin to be connected to the db on init.

Any ideas why I need to force the connect directly in the plugin?

 try {
      // Connect to the 'db' service
      this.db = await cds.connect.to('db');
      console.log('Database connection established.');
    } catch (error) {
        console.error('Failed to connect to the database:', error);
        throw error;
    }

Upvotes: 0

Views: 97

Answers (0)

Related Questions