Skip to content

Data from Some Web Source cannot be fetched #199

Open
@maheshj01

Description

🐛 Describe the bug

       try {
            const ragApplication = await new RAGApplicationBuilder()
                .setModel(new Ollama({ modelName: "llama3.1", baseUrl: 'http://localhost:11434' }))
                .setEmbeddingModel(new OllamaEmbeddings({ model: 'nomic-embed-text', baseUrl: 'http://localhost:11434' }))
                .setVectorDatabase(new HNSWDb())
                .build();
            const loader1 = new WebLoader({ urlOrContent: 'https://www.threads.net/@zuck' })
            const respo = await ragApplication.addLoader(loader1);

            const response = await ragApplication.query('Tell me more about this user and his work');
            res.status(201).json({ message: 'Request submitted successfully', response });

        } catch (error) {
            console.error('Error in submitRequest:', error);
            res.status(500).json({ error: 'Internal Server Error' });
        }

output

// 20250105171719
// http://localhost:8080/api/v1/query

{
  "message": "Request submitted successfully",
  "response": {
    "id": "1f862dc1-44c9-4a86-9224-49011bca986d",
    "timestamp": "2025-01-05T22:17:12.374Z",
    "content": "I don't have any information about a specific user or their work. This conversation has just started, and I haven't received any previous messages or requests for information. If you'd like to share more details or ask a question, I'll do my best to provide an answer based on what I know.",
    "actor": "AI",
    "sources": [
      
    ],
    "tokenUse": {
      "inputTokens": "UNKNOWN",
      "outputTokens": "UNKNOWN"
    }
  }
}

cc: @adhityan

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions