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

Update to latest AI Guard response schema #341

Merged
merged 2 commits into from
Jan 15, 2025
Merged

Conversation

kenany
Copy link
Member

@kenany kenany commented Jan 13, 2025

No description provided.

@kenany kenany self-assigned this Jan 13, 2025
@kenany kenany requested a review from a team as a code owner January 13, 2025 21:22
Type string `json:"type"`
Value string `json:"value"`
Redacted bool `json:"redacted"`
StartPos *float64 `json:"start_pos,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start_pos is for "start position"? In that case should it be an int?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a number type in the spec, which includes both integers and floats, but yeah it is probably supposed to be an integer. Updated.

Type string `json:"type"`
Value string `json:"value"`
Redacted *bool `json:"redacted,omitempty"`
StartPos *float64 `json:"start_pos,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

type MaliciousEntity struct {
Type string `json:"type"`
Value string `json:"value"`
Redacted *bool `json:"redacted,omitempty"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to be optional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's marked as such in the OpenAPI spec 🤷

@kenany kenany merged commit 43205dd into beta Jan 15, 2025
10 of 11 checks passed
@kenany kenany deleted the kenany/ai-guard-updates branch January 15, 2025 05:53
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

Successfully merging this pull request may close these issues.

2 participants