From 0ac67c27a197eb13a66af7ad9c6b39b3f2d41aa1 Mon Sep 17 00:00:00 2001 From: Roger Yang Date: Wed, 30 Oct 2024 21:58:17 -0700 Subject: [PATCH] feat: add response_format to invocation parameters --- app/schema.graphql | 1 + .../__generated__/PlaygroundOutputSubscription.graphql.ts | 3 ++- src/phoenix/server/api/input_types/InvocationParameters.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/schema.graphql b/app/schema.graphql index c73ca07cd0..d5252b62b8 100644 --- a/app/schema.graphql +++ b/app/schema.graphql @@ -936,6 +936,7 @@ input InvocationParameters { stop: [String!] seed: Int toolChoice: JSON + responseFormat: JSON } """ diff --git a/app/src/pages/playground/__generated__/PlaygroundOutputSubscription.graphql.ts b/app/src/pages/playground/__generated__/PlaygroundOutputSubscription.graphql.ts index ccd5b858e9..80f91d0133 100644 --- a/app/src/pages/playground/__generated__/PlaygroundOutputSubscription.graphql.ts +++ b/app/src/pages/playground/__generated__/PlaygroundOutputSubscription.graphql.ts @@ -1,5 +1,5 @@ /** - * @generated SignedSource<> + * @generated SignedSource<> * @lightSyntaxTransform * @nogrep */ @@ -27,6 +27,7 @@ export type GenerativeModelInput = { export type InvocationParameters = { maxCompletionTokens?: number | null; maxTokens?: number | null; + responseFormat?: any | null; seed?: number | null; stop?: ReadonlyArray | null; temperature?: number | null; diff --git a/src/phoenix/server/api/input_types/InvocationParameters.py b/src/phoenix/server/api/input_types/InvocationParameters.py index ea1164ec59..dc00292553 100644 --- a/src/phoenix/server/api/input_types/InvocationParameters.py +++ b/src/phoenix/server/api/input_types/InvocationParameters.py @@ -18,3 +18,4 @@ class InvocationParameters: stop: Optional[list[str]] = UNSET seed: Optional[int] = UNSET tool_choice: Optional[JSON] = UNSET + response_format: Optional[JSON] = UNSET