-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
cpu-remote-inference
Docker image (#5225)
* Add cpu-remote-inference Docker image * Add web lfqa pipeline as an example for cpu-remote-inference Docker image * WebRetriever must have document_store attribute * Add cpu-remote-inference-latest * Add image testing in CI --------- Co-authored-by: Silvano Cerza <silvanocerza@gmail.com>
- Loading branch information
1 parent
08f1865
commit 395854d
Showing
4 changed files
with
129 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
rest_api/rest_api/pipeline/pipelines_web_lfqa.haystack-pipeline.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
version: ignore | ||
|
||
components: | ||
- name: Retriever | ||
params: | ||
api_key: RETRIEVER_PARAMS_API_KEY | ||
type: WebRetriever | ||
- name: Shaper | ||
params: | ||
func: join_documents_and_scores | ||
inputs: | ||
documents: documents | ||
outputs: | ||
- documents | ||
type: Shaper | ||
- name: custom-at-query-time | ||
params: | ||
prompt: "\nSynthesize a comprehensive answer from the following most relevant\ | ||
\ paragraphs and the given question.\nProvide a clear and concise response that\ | ||
\ summarizes the key points and information presented in the paragraphs.\nYour\ | ||
\ answer should be in your own words and be no longer than 50 words.\n\n\n Paragraphs:\ | ||
\ {documents} \n\n Question: {query} \n\n Answer:\n" | ||
type: PromptTemplate | ||
- name: PromptNode | ||
params: | ||
api_key: PROMPTNODE_PARAMS_API_KEY | ||
default_prompt_template: custom-at-query-time | ||
max_length: 256 | ||
model_name_or_path: gpt-3.5-turbo | ||
type: PromptNode | ||
pipelines: | ||
- name: query | ||
nodes: | ||
- inputs: | ||
- Query | ||
name: Retriever | ||
- inputs: | ||
- Retriever | ||
name: Shaper | ||
- inputs: | ||
- Shaper | ||
name: PromptNode |