You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Ashish-Soni08 Hello there! I'm here to assist you with any coding bugs or questions you have. If you need any help, feel free to ask.
To resolve the validation error for LLMMetadata related to the context_window when using the SambaNovaCloud integration in LlamaIndex, ensure that the context_window is correctly set and is a valid integer. The error occurs because context_window is being set to None, which is not a valid integer.
You should modify the metadata property in the SambaNovaCloud class to ensure that context_window is initialized with a valid integer value. Here's an example of how you might set it:
@propertydefmetadata(self) ->LLMMetadata:
"""LLM metadata."""returnLLMMetadata(
context_window=1024, # Set this to a valid integer valuenum_output=self.max_tokens,
is_chat_model=True,
model_name=self.model,
)
Make sure that the context_window value is appropriate for your model's capabilities and does not exceed its context length. Adjust the value as needed based on your specific requirements and the model's specifications [1].
Bug Description
The code in the integration that I believe is causing the issue -> Llamaindex on Github
The error I get -> when I try to run index.as_query_engine() method
Version
0.12.0
Steps to Reproduce
pip install "llama-index-llms-sambanovacloud" pip install sseclient-py
Relevant Logs/Tracbacks
The text was updated successfully, but these errors were encountered: