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

Fix up safety client for versioned API #573

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

stevegrubb
Copy link
Contributor

When running:
python -m llama_stack.apis.safety.client localhost 5000

The API server was logging:
INFO: ::1:57176 - "POST /safety/run_shield HTTP/1.1" 404 Not Found

This patch uses the versioned API, uses the updated safety endpoint, and updates the model name to what's being served. The above python command now demonstrates a passing and failing example.

When running:
python -m llama_stack.apis.safety.client localhost 5000

The API server was logging:
INFO:    ::1:57176 - "POST /safety/run_shield HTTP/1.1" 404 Not Found

This patch uses the versioned API, uses the updated safety endpoint,
and updates the model name to what's being served.
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Dec 5, 2024
@ashwinb ashwinb merged commit a4daf4d into meta-llama:main Dec 5, 2024
2 checks passed
@ashwinb
Copy link
Contributor

ashwinb commented Dec 6, 2024

@stevegrubb We will be deleting these client.py files which served two purposes initially -- they were used as REST clients but also had some easy-to-use testing functionality which developers used when working with the stack server. Now, the client functionality has moved to https://github.com/meta-llama/llama-stack/blob/main/llama_stack/distribution/client.py. Tests have moved to either pytest or examples in llama-stack-apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants