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

[bug] Guards that dont exist in settings.use_remote = True dont error and openAI api error for guard not found not helpful #1015

Closed
dtam opened this issue Aug 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dtam
Copy link
Contributor

dtam commented Aug 16, 2024

Describe the bug
A clear and concise description of what the bug is.
no guard when using the server should be easier to figure out

To Reproduce

from guardrails import settings

settings.use_remote = True
Guard(name="basic")(
    model="gpt-4o-mini",
    messages=[{
        "role": "system",
        "content": "Welcome to the OpenAI chatbot! How can I help you today?"
    }]
)

should error if the guard isnt found

# Next, we created a Guarded endpoint that uses the hallucination validator:
guarded_client = OpenAI(
    api_key=openai_api_key,
    base_url="http://127.0.0.1:8000/guards/basic/openai/v1/"
)

guarded_client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{
        "role": "system",
        "content": "Welcome to the OpenAI chatbot! How can I help you today?"
    }]
)

errors in an arcane server 500

Expected behavior
should be easier to figure out

Library version:
Version (0.5.X)

Additional context
Add any other context about the problem here.

@dtam dtam added the bug Something isn't working label Aug 16, 2024
@dtam
Copy link
Contributor Author

dtam commented Aug 16, 2024

@dtam
Copy link
Contributor Author

dtam commented Aug 20, 2024

this was addressed in 0.5.5

@dtam dtam closed this as completed Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant