-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
pangea-sdk/service/ai_guard/api.go
Outdated
Type string `json:"type"` | ||
Value string `json:"value"` | ||
Redacted bool `json:"redacted"` | ||
StartPos *float64 `json:"start_pos,omitempty"` |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
pangea-sdk/service/ai_guard/api.go
Outdated
Type string `json:"type"` | ||
Value string `json:"value"` | ||
Redacted *bool `json:"redacted,omitempty"` | ||
StartPos *float64 `json:"start_pos,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
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"` |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 🤷
No description provided.