mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
Cleaner fallback
This commit is contained in:
parent
7f38581160
commit
e676eaa85d
1 changed files with 1 additions and 3 deletions
|
@ -21,9 +21,7 @@ class LangsmithLogger:
|
||||||
def log_event(self, kwargs, response_obj, start_time, end_time, print_verbose):
|
def log_event(self, kwargs, response_obj, start_time, end_time, print_verbose):
|
||||||
# Method definition
|
# Method definition
|
||||||
# inspired by Langsmith http api here: https://github.com/langchain-ai/langsmith-cookbook/blob/main/tracing-examples/rest/rest.ipynb
|
# inspired by Langsmith http api here: https://github.com/langchain-ai/langsmith-cookbook/blob/main/tracing-examples/rest/rest.ipynb
|
||||||
metadata = kwargs.get('litellm_params', {}).get("metadata", {})
|
metadata = kwargs.get('litellm_params', {}).get("metadata", {}) or {} # if metadata is None
|
||||||
if metadata is None:
|
|
||||||
metadata = {}
|
|
||||||
|
|
||||||
# set project name and run_name for langsmith logging
|
# set project name and run_name for langsmith logging
|
||||||
# users can pass project_name and run name to litellm.completion()
|
# users can pass project_name and run name to litellm.completion()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue