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

Function initialize

litellm/proxy/proxy_server.py:10010–10141  ·  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,
    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

10008
10009
10010async def initialize(
10011 model=None,
10012 alias=None,
10013 api_base=None,
10014 api_version=None,
10015 debug=False,
10016 detailed_debug=False,
10017 temperature=None,
10018 max_tokens=None,
10019 request_timeout=600,
10020 max_budget=None,
10021 drop_params=True,
10022 add_function_to_prompt=True,
10023 headers=None,
10024 save=False,
10025 use_queue=False,
10026 config=None,
10027):
10028 global \
10029 user_model, \
10030 user_api_base, \
10031 user_debug, \
10032 user_detailed_debug, \
10033 user_user_max_tokens, \
10034 user_request_timeout, \
10035 user_temperature, \
10036 user_headers, \
10037 experimental, \
10038 llm_model_list, \
10039 llm_router, \
10040 general_settings, \
10041 master_key, \
10042 user_custom_auth, \
10043 prisma_client
10044 from litellm.proxy.common_utils.banner import LITELLM_BANNER
10045
10046 print_startup_message(f"\n{LITELLM_BANNER}\n")
10047 if os.getenv("LITELLM_DONT_SHOW_FEEDBACK_BOX", "").lower() != "true":
10048 generate_feedback_box()
10049 user_model = model
10050 user_debug = debug
10051 if debug is True: # this needs to be first, so users can see Router init debugg
10052 import logging
10053
10054 from litellm._logging import (
10055 verbose_logger,
10056 verbose_proxy_logger,
10057 verbose_router_logger,
10058 )
10059
10060 # this must ALWAYS remain logging.INFO, DO NOT MODIFY THIS
10061 verbose_logger.setLevel(level=logging.INFO) # sets package logs to info
10062 verbose_router_logger.setLevel(level=logging.INFO) # set router logs to info
10063 verbose_proxy_logger.setLevel(level=logging.INFO) # set proxy logs to info
10064 if detailed_debug is True:
10065 import logging
10066
10067 from litellm._logging import (

Callers 15

_initialize_proxyFunction · 0.90
clientFunction · 0.90
client_no_authFunction · 0.90
clientFunction · 0.90
client_no_authFunction · 0.90
clientFunction · 0.90
client_no_authFunction · 0.90
create_proxy_test_clientFunction · 0.90

Calls 6

print_startup_messageFunction · 0.90
generate_feedback_boxFunction · 0.85
getMethod · 0.65
floatFunction · 0.50
lowerMethod · 0.45
load_configMethod · 0.45

Tested by 15

_initialize_proxyFunction · 0.72
clientFunction · 0.72
client_no_authFunction · 0.72
clientFunction · 0.72
client_no_authFunction · 0.72
clientFunction · 0.72
client_no_authFunction · 0.72
create_proxy_test_clientFunction · 0.72