Find answers from the community

Updated 3 months ago

Hi All,

Hi All,
is anyone facing this issue while trying to retrive data from llama cloud

ValidationError: 1 validation error for ParsingModel[List[llama_cloud.types.pipeline.Pipeline]]
root -> 0 -> eval_parameters -> llm_model
value is not a valid enumeration member; permitted: 'GPT_3_5_TURBO', 'GPT_4', 'GPT_4_TURBO' (type=type_error.enum; enum_values=[<SupportedEvalLlmModelNames.GPT_3_5_TURBO: 'GPT_3_5_TURBO'>, <SupportedEvalLlmModelNames.GPT_4: 'GPT_4'>, <SupportedEvalLlmModelNames.GPT_4_TURBO: 'GPT_4_TURBO'>])

the code im using is below :
Plain Text
from llama_index.indices.managed.llama_cloud import LlamaCloudIndex
from llama_index.llms.openai import OpenAI

from llama_index.core.vector_stores import (
    MetadataFilter,
    MetadataFilters,
    FilterOperator,
)

index = LlamaCloudIndex(
name="insurance-detail", 
project_name="policy_gpt",
organization_id="a1b3bd00-6958-4b47-bd51-f4c85ad7f8de",
api_key="llx-xxxxxxxxxxxxxi"
)
    
llm = OpenAI(model="gpt-4o-mini")
#  create metadata filter 
filters = MetadataFilters(
    filters=[
        MetadataFilter(
            # key="file_name", operator=FilterOperator.EQ, value="HDFC"
            key="file_name", operator=FilterOperator.EQ, value="HDFC ERGO hospital-daily-cash-rider HDHHLIP21344V02202.pdf"
            
        ),
    ]
)

# configure retriever
retriever = index.as_retriever(
  dense_similarity_top_k=10,
  sparse_similarity_top_k=3,
#   alpha=1.0,
#   llm=llm,
  enable_reranking=True, 
  rerank_top_n=3,
  filters=filters,
)
nodes = retriever.retrieve("what are the excultions in my policy")
L
m
3 comments
Are you sure you get that error from this code? do you have the full traceback?
full traceback as in ?
You have an error, but what was the traceback/stack trace accompanying that error? It would help track down what the actual issue is
Add a reply
Sign up and join the conversation on Discord