Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixes for schema casting in predictions responses
  • Loading branch information
spillai committed Mar 31, 2025
commit 4fcd9d82033ad352a13053a207ccc374eaca8319
8 changes: 4 additions & 4 deletions vlmrun/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from vlmrun.client.feedback import Feedback
from vlmrun.client.agent import Agent
from vlmrun.constants import DEFAULT_BASE_URL
from vlmrun.client.types import SchemaResponse, DomainInfo
from vlmrun.client.types import SchemaResponse, DomainInfo, GenerationConfig


@dataclass
Expand Down Expand Up @@ -122,20 +122,20 @@ def get_type(self, domain: str, gql_stmt: Optional[str] = None) -> Type[BaseMode
"""Get the type for a domain."""
return self.get_schema(domain, gql_stmt).response_model

def get_schema(self, domain: str, gql_stmt: Optional[str] = None) -> SchemaResponse:
def get_schema(self, domain: str, config: Optional[GenerationConfig] = None) -> SchemaResponse:
"""Get the schema for a domain.

Args:
domain: Domain name (e.g. "document.invoice")
gql_stmt: GraphQL statement to use for the schema
config: Generation config

Returns:
Schema response containing GraphQL schema and metadata
"""
response, status_code, headers = self.requestor.request(
method="POST",
url="/schema",
data={"domain": domain, "gql_stmt": gql_stmt},
data={"domain": domain, "config": config},
)
return SchemaResponse(**response)

Expand Down
2 changes: 1 addition & 1 deletion vlmrun/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.10"
__version__ = "0.2.11"