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

Selecting a provider via '?Provider=' in the URL does not work in a curl request #2240

Closed
iG8R opened this issue Sep 21, 2024 · 6 comments
Closed
Assignees
Labels
bug Something isn't working stale

Comments

@iG8R
Copy link

iG8R commented Sep 21, 2024

When using curl to send a request to the g4f api server and selecting a provider via the ?Provider= parameter, it doesn't work the way it should, namely g4f starts trying all providers that support the model in the request.

Example:
curl -H "Content-Type: application/json" -H "Authorization: Bearer" -d "{\"model\":\"gpt-4o-mini\",\"messages\":[{\"role\":\"user\", \"content\": \"Say this is a test!\"}],\"temperature\": 0.7}" http://127.0.0.1:1337/v1/chat/completions?Provider=ChatGpt

image

image

@iG8R iG8R added the bug Something isn't working label Sep 21, 2024
@iG8R
Copy link
Author

iG8R commented Sep 21, 2024

Sorry, the issue is solved.
It turned out that the ?Provider= parameter should start with a small letter, i.e. it should be ?provider=, although I remember using it with a capital letter as well.

@iG8R iG8R closed this as completed Sep 21, 2024
@iG8R iG8R reopened this Sep 21, 2024
@iG8R
Copy link
Author

iG8R commented Sep 21, 2024

Is it possible to make sure that the letter case in this parameter does not affect the processing of the request?

Copy link

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

@github-actions github-actions bot added the stale label Sep 29, 2024
@iG8R
Copy link
Author

iG8R commented Sep 29, 2024

up

@github-actions github-actions bot removed the stale label Sep 30, 2024
Copy link

github-actions bot commented Oct 7, 2024

Bumping this issue because it has been open for 7 days with no activity. Closing automatically in 7 days unless it becomes active again.

@github-actions github-actions bot added the stale label Oct 7, 2024
Copy link

Closing due to inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants