MCPcopy Create free account
hub / github.com/BerriAI/litellm / initialize

Function initialize

litellm/proxy/proxy_server.py:7153–7287  ·  view source on GitHub ↗
(
    model=None,
    alias=None,
    api_base=None,
    api_version=None,
    debug=False,
    detailed_debug=False,
    temperature=None,
    max_tokens=None,
    request_timeout=600,
    max_budget=None,
    telemetry=False,
    drop_params=True,
    add_function_to_prompt=True,
    headers=None,
    save=False,
    use_queue=False,
    config=None,
)

Source from the content-addressed store, hash-verified

7151
7152
7153async def initialize(
7154 model=None,
7155 alias=None,
7156 api_base=None,
7157 api_version=None,
7158 debug=False,
7159 detailed_debug=False,
7160 temperature=None,
7161 max_tokens=None,
7162 request_timeout=600,
7163 max_budget=None,
7164 telemetry=False,
7165 drop_params=True,
7166 add_function_to_prompt=True,
7167 headers=None,
7168 save=False,
7169 use_queue=False,
7170 config=None,
7171):
7172 global \
7173 user_model, \
7174 user_api_base, \
7175 user_debug, \
7176 user_detailed_debug, \
7177 user_user_max_tokens, \
7178 user_request_timeout, \
7179 user_temperature, \
7180 user_telemetry, \
7181 user_headers, \
7182 experimental, \
7183 llm_model_list, \
7184 llm_router, \
7185 general_settings, \
7186 master_key, \
7187 user_custom_auth, \
7188 prisma_client
7189 from litellm.proxy.common_utils.banner import show_banner
7190
7191 show_banner()
7192 if os.getenv("LITELLM_DONT_SHOW_FEEDBACK_BOX", "").lower() != "true":
7193 generate_feedback_box()
7194 user_model = model
7195 user_debug = debug
7196 if debug is True: # this needs to be first, so users can see Router init debugg
7197 import logging
7198
7199 from litellm._logging import (
7200 verbose_logger,
7201 verbose_proxy_logger,
7202 verbose_router_logger,
7203 )
7204
7205 # this must ALWAYS remain logging.INFO, DO NOT MODIFY THIS
7206 verbose_logger.setLevel(level=logging.INFO) # sets package logs to info
7207 verbose_router_logger.setLevel(level=logging.INFO) # set router logs to info
7208 verbose_proxy_logger.setLevel(level=logging.INFO) # set proxy logs to info
7209 if detailed_debug is True:
7210 import logging

Callers 15

client_no_authFunction · 0.90
clientFunction · 0.90
client_no_authFunction · 0.90
clientFunction · 0.90
clientFunction · 0.90
client_no_authFunction · 0.90
clientFunction · 0.90
client_no_authFunction · 0.90
proxy_appFunction · 0.90
_runFunction · 0.90

Calls 4

show_bannerFunction · 0.90
generate_feedback_boxFunction · 0.85
getMethod · 0.65
load_configMethod · 0.45

Tested by 15

client_no_authFunction · 0.72
clientFunction · 0.72
client_no_authFunction · 0.72
clientFunction · 0.72
clientFunction · 0.72
client_no_authFunction · 0.72
clientFunction · 0.72
client_no_authFunction · 0.72
proxy_appFunction · 0.72
_runFunction · 0.72