mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
* fix(initial-commit): adding a way to get the right response type based on the api route * feat(unified_guardrail.py): support streaming guardrails * test: update tests * fix: fix linting errors * test: update tests
773 B
773 B
Folder Contents
This folder contains general-purpose utilities that are used in multiple places in the codebase.
Core files:
streaming_handler.py: The core streaming logic + streaming related helper utilscore_helpers.py: code used intypes/- e.g.map_finish_reason.exception_mapping_utils.py: utils for mapping exceptions to openai-compatible error types.default_encoding.py: code for loading the default encoding (tiktoken)get_llm_provider_logic.py: code for inferring the LLM provider from a given model name.duration_parser.py: code for parsing durations - e.g. "1d", "1mo", "10s"api_route_to_call_types.py: mapping of API routes to their corresponding CallTypes (e.g.,/chat/completions-> [acompletion, completion])