Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Has anyone ever met? litellm.set_verbose=True #150

Open
CCC002FA7 opened this issue May 24, 2024 · 4 comments
Open

Has anyone ever met? litellm.set_verbose=True #150

CCC002FA7 opened this issue May 24, 2024 · 4 comments

Comments

@CCC002FA7
Copy link

Linux

Give Feedback / Get Help: https://github.com/BerriAI/litellm/issues/new
LiteLLM.Info: If you need to debug this error, use `litellm.set_verbose=True'.

Traceback (most recent call last):
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/llms/openai.py", line 574, in completion
raise e
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/llms/openai.py", line 534, in completion
stringified_response = response.model_dump()
AttributeError: 'str' object has no attribute 'model_dump'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/main.py", line 1079, in completion
raise e
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/main.py", line 1052, in completion
response = openai_chat_completions.completion(
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/llms/openai.py", line 582, in completion
raise OpenAIError(status_code=500, message=traceback.format_exc())
litellm.llms.openai.OpenAIError: Traceback (most recent call last):
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/llms/openai.py", line 574, in completion
raise e
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/llms/openai.py", line 534, in completion
stringified_response = response.model_dump()
AttributeError: 'str' object has no attribute 'model_dump'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "run.py", line 97, in
sales_agent.step()
File "/home/leo/SalesGPT/salesgpt/logger.py", line 46, in wrapper
result = func(*args, **kwargs) # Function execution
File "/home/leo/SalesGPT/salesgpt/agents.py", line 253, in step
return self._call(inputs={})
File "/home/leo/SalesGPT/salesgpt/agents.py", line 520, in _call
ai_message = self.sales_conversation_utterance_chain.invoke(
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/langchain/chains/base.py", line 162, in invoke
raise e
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/langchain/chains/base.py", line 156, in invoke
self._call(inputs, run_manager=run_manager)
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/langchain/chains/llm.py", line 103, in _call
response = self.generate([inputs], run_manager=run_manager)
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/langchain/chains/llm.py", line 115, in generate
return self.llm.generate_prompt(
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/langchain_core/language_models/chat_models.py", line 544, in generate_prompt
return self.generate(prompt_messages, stop=stop, callbacks=callbacks, **kwargs)
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/langchain_core/language_models/chat_models.py", line 408, in generate
raise e
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/langchain_core/language_models/chat_models.py", line 398, in generate
self._generate_with_cache(
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/langchain_core/language_models/chat_models.py", line 577, in _generate_with_cache
return self._generate(
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/langchain_community/chat_models/litellm.py", line 307, in _generate
response = self.completion_with_retry(
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/langchain_community/chat_models/litellm.py", line 240, in completion_with_retry
return _completion_with_retry(**kwargs)
File "/home/leo/.local/lib/python3.8/site-packages/tenacity/init.py", line 289, in wrapped_f
return self(f, *args, **kw)
File "/home/leo/.local/lib/python3.8/site-packages/tenacity/init.py", line 379, in call
do = self.iter(retry_state=retry_state)
File "/home/leo/.local/lib/python3.8/site-packages/tenacity/init.py", line 325, in iter
raise retry_exc.reraise()
File "/home/leo/.local/lib/python3.8/site-packages/tenacity/init.py", line 158, in reraise
raise self.last_attempt.result()
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/home/leo/.local/lib/python3.8/site-packages/tenacity/init.py", line 382, in call
result = fn(*args, **kwargs)
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/langchain_community/chat_models/litellm.py", line 238, in _completion_with_retry
return self.client.completion(**kwargs)
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/utils.py", line 3361, in wrapper
raise e
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/utils.py", line 3255, in wrapper
result = original_function(*args, **kwargs)
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/main.py", line 2370, in completion
raise exception_type(
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/utils.py", line 9782, in exception_type
raise e
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/utils.py", line 8533, in exception_type
raise APIError(
litellm.exceptions.APIError: OpenAIException - Traceback (most recent call last):
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/llms/openai.py", line 574, in completion
raise e
File "/home/leo/miniconda3/envs/SalesGPT/lib/python3.8/site-packages/litellm/llms/openai.py", line 534, in completion
stringified_response = response.model_dump()
AttributeError: 'str' object has no attribute 'model_dump'

@xialixx
Copy link

xialixx commented Jun 28, 2024

Did you solve it? I met it, too.

@CCC002FA7
Copy link
Author

CCC002FA7 commented Jun 28, 2024 via email

@xialixx
Copy link

xialixx commented Jun 28, 2024

25C71EF0-C711-4a83-BD2C-C64E209FE8FD
Don't know how to modify it. help me, Thanks!

@chemik-bit
Copy link
Collaborator

Hi @xialixx, are you still having problems with this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants