Skip to content

Commit

Permalink
Update gql schema
Browse files Browse the repository at this point in the history
  • Loading branch information
anticorrelator committed Oct 31, 2024
1 parent 1447006 commit 8c65216
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions app/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -975,8 +975,6 @@ type IntInvocationParameter implements InvocationParameterBase {
defaultValue: Int
}

union IntInvocationParameterFloatInvocationParameterBoundedFloatInvocationParameterStringInvocationParameterJSONInvocationParameterStringListInvocationParameterBooleanInvocationParameter = IntInvocationParameter | FloatInvocationParameter | BoundedFloatInvocationParameter | StringInvocationParameter | JSONInvocationParameter | StringListInvocationParameter | BooleanInvocationParameter

type IntervalBin {
range: NumericRange!
}
Expand All @@ -991,6 +989,8 @@ enum InvocationInputField {
value_boolean
}

union InvocationParameter = IntInvocationParameter | FloatInvocationParameter | BoundedFloatInvocationParameter | StringInvocationParameter | JSONInvocationParameter | StringListInvocationParameter | BooleanInvocationParameter

interface InvocationParameterBase {
invocationName: String!
canonicalName: CanonicalParameterName
Expand Down Expand Up @@ -1269,7 +1269,7 @@ type PromptResponse {
type Query {
modelProviders: [GenerativeProvider!]!
models(input: ModelsInput = null): [GenerativeModel!]!
modelInvocationParameters(input: ModelsInput = null): [IntInvocationParameterFloatInvocationParameterBoundedFloatInvocationParameterStringInvocationParameterJSONInvocationParameterStringListInvocationParameterBooleanInvocationParameter!]!
modelInvocationParameters(input: ModelsInput = null): [InvocationParameter!]!
users(first: Int = 50, last: Int, after: String, before: String): UserConnection!
userRoles: [UserRole!]!
userApiKeys: [UserApiKey!]!
Expand Down
10 changes: 5 additions & 5 deletions src/phoenix/server/api/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
CanonicalParameterName,
IntInvocationParameter,
InvocationParameterInput,
InvocationParameterType,
InvocationParameter,
JSONInvocationParameter,
StringListInvocationParameter,
extract_parameter,
Expand Down Expand Up @@ -164,7 +164,7 @@ def __init__(

@classmethod
@abstractmethod
def supported_invocation_parameters(cls) -> list[InvocationParameterType]: ...
def supported_invocation_parameters(cls) -> list[InvocationParameter]: ...

@abstractmethod
async def chat_completion_create(
Expand Down Expand Up @@ -238,7 +238,7 @@ def __init__(
self.model_name = model.name

@classmethod
def supported_invocation_parameters(cls) -> list[InvocationParameterType]:
def supported_invocation_parameters(cls) -> list[InvocationParameter]:
return [
BoundedFloatInvocationParameter(
invocation_name="temperature",
Expand Down Expand Up @@ -436,7 +436,7 @@ def _llm_token_counts(usage: "CompletionUsage") -> Iterator[tuple[str, Any]]:
)
class OpenAIO1StreamingClient(OpenAIStreamingClient):
@classmethod
def supported_invocation_parameters(cls) -> list[InvocationParameterType]:
def supported_invocation_parameters(cls) -> list[InvocationParameter]:
return [
IntInvocationParameter(
invocation_name="max_completion_tokens",
Expand Down Expand Up @@ -620,7 +620,7 @@ def __init__(
self.model_name = model.name

@classmethod
def supported_invocation_parameters(cls) -> list[InvocationParameterType]:
def supported_invocation_parameters(cls) -> list[InvocationParameter]:
return [
IntInvocationParameter(
invocation_name="max_tokens",
Expand Down

0 comments on commit 8c65216

Please sign in to comment.