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

Certain URLs in api_url with Nvidia components throwing url format errors #1295

Open
2-ulfhednar-2 opened this issue Jan 16, 2025 · 0 comments
Assignees
Labels
bug Something isn't working P1

Comments

@2-ulfhednar-2
Copy link

2-ulfhednar-2 commented Jan 16, 2025

Describe the bug
When creating an Nvidia component with a custom link that isn't in the format http://localhost:8080/v1 or http://localhost:8080 you get:
ValueError: Base URL path is not recognized. Expected format is 'http://host:port'.

This error is also thrown if you use links similar to those specified in this cookbook
https://haystack.deepset.ai/cookbook/rag-with-nims
e.g. "http://nims.example.com/embedding"; "http://nims.example.com/embedding/v1"
or "http://nims.example.com/llm"; "http://nims.example.com/llm/v1"

It seeems to affect all components and is likely caused by the url_validation function called when initializing the components

To Reproduce
Create an Embedder or a Generator (other components likely affected too) with the api_urls specified in the following cookbook.
https://haystack.deepset.ai/cookbook/rag-with-nims

Describe your environment (please complete the following information):

  • OS: Windows 11 and Ubuntu Linux tested
  • Haystack version: 2.9.0
  • Integration version: Nvidia-haystack 0.1.4

To fix maybe rework the URL_validation function to do the following things instead of how it is currently handled:

  • Check if it's one of the known special Nvidia links
  • Check the last 2 characters to see if it is ending with v1, and if it is not v1, add that to the URL, if it ends with v1, pass it through.
@2-ulfhednar-2 2-ulfhednar-2 added the bug Something isn't working label Jan 16, 2025
@2-ulfhednar-2 2-ulfhednar-2 changed the title Custom links with Nvidia components throwing link format errors Custom api_url with Nvidia components throwing url format errors Jan 16, 2025
@2-ulfhednar-2 2-ulfhednar-2 changed the title Custom api_url with Nvidia components throwing url format errors Certain URLs in api_url with Nvidia components throwing url format errors Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P1
Projects
None yet
Development

No branches or pull requests

3 participants