Skip to content

Commit f1e6774

Browse files
committed
revert to enum bc the generated code is more usable
1 parent a82d067 commit f1e6774

File tree

1 file changed

+12
-28
lines changed

1 file changed

+12
-28
lines changed

service-specs/guardrails-service-spec.yml

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -473,33 +473,6 @@ components:
473473
oneOf:
474474
- $ref: "#/components/schemas/AnyObject"
475475
- $ref: "#/components/schemas/AnyPrimitive"
476-
LlmApi:
477-
type: string
478-
oneOf:
479-
- title: OPENAI_V0_COMPLETION_CREATE
480-
const: openai.Completion.create
481-
description: OpenAI V0 Completion Create
482-
- title: OPENAI_V1_COMPLETIONS_CREATE
483-
const: openai.completions.create
484-
description: OpenAI V1 Completions Create
485-
- title: OPENAI_V0_CHAT_COMPLETION_CREATE
486-
const: openai.ChatCompletion.create
487-
description: OpenAI V0 Chat Completion Create
488-
- title: OPENAI_V1_CHAT_COMPLETION_CREATE
489-
const: openai.chat.completions.create
490-
description: OpenAI V1 Chat Completions Create
491-
- title: OPENAI_V0_COMPLETION_ASYNC_CREATE
492-
const: openai.Completion.acreate
493-
description: OpenAI V0 Completion Async Create
494-
- title: OPENAI_V0_CHAT_COMPLETION_ASYNC_CREATE
495-
const: openai.ChatCompletion.acreate
496-
description: OpenAI V0 Chat Completion Async Create
497-
- title: LITELLM_COMPLETION
498-
const: litellm.completion
499-
description: LiteLLM Completion
500-
- title: LITELLM_ASYNC_COMPLETION
501-
const: litellm.acompletion
502-
description: LiteLLM Async Completion
503476
ValidatePayload:
504477
type: object
505478
properties:
@@ -516,5 +489,16 @@ components:
516489
properties: {}
517490
additionalProperties: {}
518491
llmApi:
519-
$ref: "#/components/schemas/LlmApi"
492+
type: string
493+
enum:
494+
[
495+
"openai.Completion.create",
496+
"openai.completions.create",
497+
"openai.ChatCompletion.create",
498+
"openai.chat.completions.create",
499+
"openai.Completion.acreate",
500+
"openai.ChatCompletion.acreate",
501+
"litellm.completion",
502+
"litellm.acompletion"
503+
]
520504
additionalProperties: {}

0 commit comments

Comments
 (0)