mirror of
https://github.com/openai/codex.git
synced 2026-04-24 14:45:27 +00:00
using camelCase
This commit is contained in:
@@ -22,11 +22,11 @@ prefix_rule(
|
||||
- Match:
|
||||
```json
|
||||
{
|
||||
"Match": {
|
||||
"match": {
|
||||
"decision": "allow|prompt|forbidden",
|
||||
"matched_rules": [
|
||||
{
|
||||
"PrefixRuleMatch": {
|
||||
"prefixRuleMatch": {
|
||||
"matched_prefix": ["<token>", "..."],
|
||||
"decision": "allow|prompt|forbidden"
|
||||
}
|
||||
@@ -38,7 +38,7 @@ prefix_rule(
|
||||
|
||||
- No match:
|
||||
```json
|
||||
"NoMatch"
|
||||
"noMatch"
|
||||
```
|
||||
|
||||
- `matched_rules` lists every rule whose prefix matched the command; `matched_prefix` is the exact prefix that matched.
|
||||
|
||||
@@ -11,6 +11,7 @@ pub struct Policy {
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum Evaluation {
|
||||
NoMatch,
|
||||
Match {
|
||||
|
||||
@@ -96,6 +96,7 @@ pub struct PrefixRule {
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum RuleMatch {
|
||||
PrefixRuleMatch {
|
||||
matched_prefix: Vec<String>,
|
||||
|
||||
Reference in New Issue
Block a user