Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data from Some Web Source cannot be fetched #199

Open
maheshj01 opened this issue Jan 5, 2025 · 0 comments
Open

Data from Some Web Source cannot be fetched #199

maheshj01 opened this issue Jan 5, 2025 · 0 comments
Assignees

Comments

@maheshj01
Copy link

maheshj01 commented Jan 5, 2025

🐛 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants