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

Getting error while trying to making a request to LLM (Large Language Model) provided IBM Watson. #6620

Open
bishwajitprasadgond opened this issue Nov 6, 2024 · 1 comment

Comments

@bishwajitprasadgond
Copy link

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'.

Provider List: https://docs.litellm.ai/docs/providers


ValueError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/litellm/llms/watsonx.py in completion(self, model, messages, custom_prompt_dict, model_response, print_verbose, encoding, logging_obj, optional_params, acompletion, litellm_params, logger_fn, timeout)
553 # regular text generation
--> 554 return handle_text_request(req_params)
555 except WatsonXAIError as e:

9 frames
ValueError: Invalid isoformat string: '2024-11-06T16:29:58.343Z'

During handling of the above exception, another exception occurred:

WatsonXAIError Traceback (most recent call last)
WatsonXAIError: Invalid isoformat string: '2024-11-06T16:29:58.343Z'

During handling of the above exception, another exception occurred:

APIConnectionError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/litellm/litellm_core_utils/exception_mapping_utils.py in exception_type(model, original_exception, custom_llm_provider, completion_kwargs, extra_kwargs)
2093 exception_mapping_worked = True
2094 if hasattr(original_exception, "request"):
-> 2095 raise APIConnectionError(
2096 message="{} - {}".format(exception_provider, error_str),
2097 llm_provider=custom_llm_provider,

APIConnectionError: litellm.APIConnectionError: WatsonxException - Invalid isoformat string: '2024-11-06T16:29:58.343Z'

@bishwajitprasadgond
Copy link
Author

This is the code
import os
from litellm import completion

response = completion(
model="watsonx/ibm/granite-13b-chat-v2",
messages=[{ "content": "What is your favorite color?","role": "user"}],
url="https://eu-de.ml.cloud.ibm.com",
api_key="myapikeywasthere",
project_id="projectidwasthere"
)

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

1 participant