mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
Potential fix for pull request finding 'CodeQL / Module-level cyclic import'
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
parent
6fee78a760
commit
8325d52451
1 changed files with 2 additions and 3 deletions
|
|
@ -8,8 +8,6 @@ extension, which performs the whole OCR call (URL, headers, HTTP, parse) in Rust
|
|||
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from litellm.llms.base_llm.ocr.transformation import OCRResponse
|
||||
|
||||
_RUST_OCR_ENABLED = False
|
||||
|
||||
|
||||
|
|
@ -30,9 +28,10 @@ def rust_ocr(
|
|||
api_key: Optional[str],
|
||||
api_base: Optional[str],
|
||||
optional_params: Dict[str, Any],
|
||||
) -> OCRResponse:
|
||||
) -> "OCRResponse":
|
||||
"""Run a Mistral OCR call end-to-end in Rust and wrap the result as ``OCRResponse``."""
|
||||
import litellm_python_bridge
|
||||
from litellm.llms.base_llm.ocr.transformation import OCRResponse
|
||||
|
||||
return OCRResponse(
|
||||
**litellm_python_bridge.ocr(model, document, api_key, api_base, optional_params)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue