Skip to content

Conversation

@sebastianMindee
Copy link
Collaborator

@sebastianMindee sebastianMindee commented Jan 26, 2026

Description

  • ✨ add support for new utility types of inferences
  • ♻️ rework how API calls are done on non-inference endpoints

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires a change to the official Guide documentation.

@sebastianMindee sebastianMindee marked this pull request as ready for review January 28, 2026 16:40
@sebastianMindee sebastianMindee changed the title ✨ add support for additional utilities ✨ add support for split utility Jan 28, 2026
@pytest.fixture(scope="session")
def split_model_id() -> str:
"""Identifier of the Financial Document model, supplied through an env var."""
return os.getenv("MINDEE_V2_SPLIT_UTILITY_MODEL_ID")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return os.getenv("MINDEE_V2_SPLIT_UTILITY_MODEL_ID")
return os.getenv("MINDEE_V2_SE_TESTS_SPLIT_MODEL_ID")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new

enqueue
get_result
enqueue_and_get_result

Remove any notion of slug

deprecated, no changes

enqueue_inference ==> calls enqueue
get_inference ==> calls get_result
enqueue_and_get_inference ==> calls enqueue_and_get_result

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

separate class for each product

add POST slug

Comment on lines +120 to +140
def _set_inference_params(
self, data: Dict[str, Union[str, List[str]]], params: InferenceParameters
) -> None:
"""
Sets the inference-specific parameters.

:param data: Data dict to fill.
:param params: Parameters to add.
"""
if params.rag is not None:
data["rag"] = str(params.rag).lower()
if params.raw_text is not None:
data["raw_text"] = str(params.raw_text).lower()
if params.confidence is not None:
data["confidence"] = str(params.confidence).lower()
if params.polygon is not None:
data["polygon"] = str(params.polygon).lower()
if params.text_context and len(params.text_context):
data["text_context"] = params.text_context
if params.data_schema is not None:
data["data_schema"] = str(params.data_schema)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put in parameters class

Comment on lines +14 to +15
_slug: str = "inferences"
"""Slug of the inference."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move slug to response classes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants