-
Notifications
You must be signed in to change notification settings - Fork 460
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
Comments
Did you solve it? I met it, too. |
Try to test your openai private key and model address. This is how I solved it
Create an. env file,
cp .env.example .env
Modify the. env file, as shown in the following example,
OPENAI_API_KEY="EMPTY"
OPENAI-API-BASE="http://<Local LLM IP Address>: 8000/v1"
LANGCHAIN_SMITH_API_KEY="ls__ToDo"
Run example,
python run.py --verbose True --config examples/example_agent_setup.json
At 2024-06-28 15:16:57, "xialixx" ***@***.***> wrote:
Did you solve it? I met it, too.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
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
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'
The text was updated successfully, but these errors were encountered: