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
Whenever i post a request to the following pipeline deployed on hayhooks, i get a 422 Client Error.
My pipeline schema YAML file and illustration are as follows:
components:
answer_builder:
init_parameters:
pattern: nullreference_pattern: nulltype: haystack.components.builders.answer_builder.AnswerBuilderllm:
init_parameters:
generation_kwargs: {}model_kwargs:
model_path: ./llama_model/llama-3-8b-instruct/ggml-model-Q4_K_M.ggufn_batch: 128n_ctx: 8192n_threads: 9use_mlock: falseverbose: falsemodel_path: ./llama_model/llama-3-8b-instruct/ggml-model-Q4_K_M.ggufn_batch: 128n_ctx: 8192type: haystack_integrations.components.generators.llama_cpp.generator.LlamaCppGeneratorprompt_builder:
init_parameters:
template: "You are an assistant for answering questions about technical documentation.\n\\ You are given a question and extracted context from the documentation.\\ Provide an instructional, precise answer.\n If you don't know the answer,\\ say 'I don't know the answer based on the context'. Do not make up an answer.\n\\ Question: {{question}}\n Context:\n {% for doc in documents %}\n\\ {{ doc.content }}\n {% endfor %}\n <|end_of_turn|>\n Answer:\n"type: haystack.components.builders.prompt_builder.PromptBuilderretriever:
init_parameters:
document_store:
init_parameters:
api_key: nullcontent_field: contentduplicate_documents: overwriteembedding_dim: 768embedding_field: embeddinggrpc_port: 6334hnsw_config: nullhost: nullhttps: nullindex: Documentinit_from: nulllocation: nullmetadata: {}name_field: nameon_disk: trueon_disk_payload: nulloptimizers_config: nullpath: ./dbpayload_fields_to_index: nullport: 6333prefer_grpc: falseprefix: nullprogress_bar: truequantization_config: nullrecreate_index: falsereplication_factor: nullreturn_embedding: truescroll_size: 10000shard_number: nullsimilarity: cosinetimeout: nullurl: nulluse_sparse_embeddings: falsewait_result_from_api: falsewal_config: nullwrite_batch_size: 100write_consistency_factor: nulltype: haystack_integrations.document_stores.qdrant.document_store.QdrantDocumentStorefilters: nullreturn_embedding: falsescale_score: truetop_k: 3type: haystack_integrations.components.retrievers.qdrant.retriever.QdrantEmbeddingRetrievertext_embedder:
init_parameters:
batch_size: 32device:
device: cputype: singlemodel: ./embedding_models/text_embeddernormalize_embeddings: falseprefix: ''progress_bar: falsesuffix: ''token:
env_vars:
- HF_API_TOKENstrict: falsetype: env_vartype: haystack.components.embedders.sentence_transformers_text_embedder.SentenceTransformersTextEmbedderconnections:
- receiver: retriever.query_embeddingsender: text_embedder.embedding
- receiver: prompt_builder.documentssender: retriever.documents
- receiver: answer_builder.documentssender: retriever.documents
- receiver: llm.promptsender: prompt_builder.prompt
- receiver: answer_builder.repliessender: llm.repliesmax_loops_allowed: 100metadata: {}
After debugging, the correct format for a POST request should be as follows:
url='http://localhost:1416/pipeline_schema'headers= {
'accept': 'application/json',
'Content-Type': 'application/json'
}
data= {
"text_embedder": {
"text": "What are the steps to configure the ET200SP?"
},
"answer_builder": {
"query": "What are the steps to configure the ET200SP?"
}
}
response=requests.post(url, headers=headers, json=data)
However, this fails every time. Same thing happens when using curl from cmd.
Unfortunately, I cannot get the API specification through http://localhost:1416/docs because an internal server error (pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.IsInstanceSchema (<class 'haystack.dataclasses.sparse_embedding.SparseEmbedding'>)) related to pydantic occurs every time I call the url from the browser.
The text was updated successfully, but these errors were encountered:
Whenever i post a request to the following pipeline deployed on hayhooks, i get a 422 Client Error.
My pipeline schema YAML file and illustration are as follows:
After debugging, the correct format for a POST request should be as follows:
However, this fails every time. Same thing happens when using curl from cmd.
Unfortunately, I cannot get the API specification through http://localhost:1416/docs because an internal server error (pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.IsInstanceSchema (<class 'haystack.dataclasses.sparse_embedding.SparseEmbedding'>)) related to pydantic occurs every time I call the url from the browser.
The text was updated successfully, but these errors were encountered: