Hostile 92% python Download

any-llm-sdk 1.53.1

Multi-provider LLM SDK, routine API code

Amazon commerce domain referenceApplies wraps to nested Python function

Evidence

imports PackageNotFoundError from importlib.metadata __init__.py · lines 1–48
1from importlib.metadata import PackageNotFoundError, version
2
3from any_llm.any_llm import AnyLLM
4from any_llm.api import (
5 acancel_batch,
6 acompletion,
7 acreate_batch,
8 adecide,
9 adownload_video,
10 aembedding,
11 aimage_edit,
12 aimage_generation,
13 alist_batches,
14 alist_models,
15 amessages,
16 amoderation,
17 apoll_video,
18 arerank,
19 aresponses,
20 aretrieve_batch,
21 aretrieve_batch_results,
22 aretrieve_video,
23 aspeech,
24 atranscription,
25 avideo_generation,
26 cancel_batch,
27 complete_video_job,
28 completion,
29 create_batch,
30 decide,
31 download_video,
32 embedding,
33 image_edit,
34 image_generation,
35 list_batches,
36 list_models,
37 messages,
38 moderation,
39 poll_video,
40 rerank,
41 responses,
42 retrieve_batch,
43 retrieve_batch_results,
44 retrieve_video,
45 speech,
46 transcription,
47 video_generation,
48)
Defines a Python function named upload_file _files.py · lines 84–95
84:45… file deletion"
85 raise NotImplementedError(message)
86
87 def upload_file(
88 self,
89 file: FileInput,
⋯6 lines
Python delete_file function _files.py · lines 118–122
118:41… etrieve_file(file_id, **kwargs), allow_running_loop=allow)
119
120 def delete_file(self, file_id: str, **kwargs: Any) -> FileDeleted:
121 """Run the synchronous counterpart of :meth:`adelete_file`."""
122 …
Defines a Python function named download_file _files.py · lines 166–170
166:43… age, provider_name=self.PROVIDER_NAME)
167
168 @contextmanager
169 def download_file(self, file_id: str, *, chunk_size: int = 65536, **kwargs: Any) -> Iterator[FileDownload]:
170 """Open a download on con …
Imports Python base64 module any_llm.py · lines 1–48
1# Inspired by https://github.com/andrewyng/aisuite/tree/main/aisuite
2from __future__ import annotations
3
4import asyncio
5import base64
6import importlib
7import os
8import re
9import time
10import warnings
11from abc import ABC, abstractmethod
12from typing import TYPE_CHECKING, Any, ClassVar, Literal, TypeVar, cast, overload
13
14import httpx
15from openresponses_types import ResponseResource
16from pydantic import BaseModel, TypeAdapter
17
18from any_llm._files import FilesMixin
19from any_llm.constants import INSIDE_NOTEBOOK, LLMProvider, get_provider_tier
20from any_llm.exceptions import (
21 AnyLLMError,
22 ContentFilterFinishReasonError,
23 InvalidRequestError,
24 LengthFinishReasonError,
25 MissingApiKeyError,
26 UnsupportedParameterError,
27 UnsupportedProviderError,
28)
29from any_llm.tools import _flatten_responses_tool, prepare_tools
30from any_llm.types.audio import AudioInput, AudioSpeechParams, AudioTranscriptionParams, Transcription
31from any_llm.types.completion import (
32 ChatCompletion,
33 ChatCompletionMessage,
34 CompletionParams,
35 ParsedChatCompletion,
36 ReasoningEffort,
37)
38from any_llm.types.decide import Question, QuestionsInput
39from any_llm.types.image import ImageEditParams, ImageGenerationParams, ImageInput, ImagesResponse
40from any_llm.types.messages import (
41 MessageDelta,
42 MessageDeltaEvent,
43 MessageDeltaUsage,
44 MessageResponse,
45 MessagesParams,
46 MessageStopEvent,
47 MessageStreamEvent,
48 ParsedBetaMessage,

Showing the top 5 files — 7 more files (140 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.