mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
test(rust): update retained OCR harnesses
This commit is contained in:
parent
9a99aaddcd
commit
bd2ce1db16
3 changed files with 6 additions and 5 deletions
1
Makefile
1
Makefile
|
|
@ -332,6 +332,7 @@ test-rust-python: install-rust-python-test-deps
|
|||
PYO3_PYTHON="$$python" \
|
||||
PYTHONPATH="$(CURDIR):$$site_packages$${PYTHONPATH:+:$$PYTHONPATH}" \
|
||||
LITELLM_LOCAL_MODEL_COST_MAP=True \
|
||||
RUST_TEST_THREADS=1 \
|
||||
cargo test --manifest-path litellm-rust/Cargo.toml \
|
||||
-p litellm-python-interop -p litellm-python-bridge --tests --locked -- --include-ignored
|
||||
|
||||
|
|
|
|||
|
|
@ -935,7 +935,7 @@ async def exercise():
|
|||
model='mistral/mistral-ocr-latest', api_key='test-key', timeout=5.0,
|
||||
api_base=f'http://127.0.0.1:{port}', litellm_logging_obj=logger,
|
||||
document={'type': 'document_url', 'document_url': 'https://example.test/doc.pdf'},
|
||||
))
|
||||
), logger, True)
|
||||
pending = native.send(state)
|
||||
del state, logger
|
||||
try:
|
||||
|
|
@ -1039,7 +1039,7 @@ logger = Logger()
|
|||
arguments = dict(model='mistral/mistral-ocr-latest', document=document,
|
||||
api_key='test-key', pages=pages, metadata=metadata,
|
||||
opaque=opaque, litellm_logging_obj=logger, timeout=Timeout())
|
||||
state = native.prepare(arguments)
|
||||
state = native.prepare(arguments, logger, False)
|
||||
native.pre_call(state)
|
||||
assert logger.calls == ['update', 'pre']
|
||||
roots = gc.get_referents(state)
|
||||
|
|
|
|||
|
|
@ -227,9 +227,9 @@ def invoke_terminal(
|
|||
from litellm.litellm_core_utils.litellm_logging import Logging
|
||||
from litellm.litellm_core_utils.logging_worker import GLOBAL_LOGGING_WORKER
|
||||
|
||||
if not isinstance(logger, Logging):
|
||||
raise TypeError(f"expected Logging, got {type(logger).__name__}")
|
||||
logging: Final = logger
|
||||
logging: Final = cast( # cast-ok: callers may supply a Logging-compatible test or plugin implementation
|
||||
Logging, logger
|
||||
)
|
||||
timing_value: Final = record.get("timing") if record is not None else None
|
||||
timing: Final = timing_value if isinstance(timing_value, Mapping) else None
|
||||
start_value: Final = timing.get("start_time") if timing is not None else None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue