-
Notifications
You must be signed in to change notification settings - Fork 0
/
valohai.yaml
85 lines (80 loc) · 2.75 KB
/
valohai.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
- step:
name: create-embeddings
image: ghcr.io/astral-sh/uv:python3.11-bookworm-slim
command: uv run rag-doctor create-database {parameters}
parameters:
- name: content_column_index
description: Index of the document content column in the CSV files
type: integer
default: 0
- name: source_column_index
description: Index of the source link column in the CSV files
type: integer
default: 1
- name: header_row_skip
description: Number of initial rows to skip in the CSV files i.e. the header rows
type: integer
default: 0
inputs:
- name: documentation_csv
description: CSV file(s) containing the technical documentation
default: https://valohai-examples.s3.amazonaws.com/rag-doc/huggingface-docs.csv
- step:
name: do-query
image: ghcr.io/astral-sh/uv:python3.11-bookworm-slim
command: uv run rag-doctor query {parameters}
parameters:
- name: question
description: The question(s) to ask about the documentation
type: string
multiple: repeat
inputs:
- name: embedding_db
description: Zip archive containing the Qdrant vector database for the embeddings
- endpoint:
name: ask
image: ghcr.io/astral-sh/uv:python3.11-bookworm-slim
port: 8000
server-command: uv run --group server rag-doctor serve --host 0.0.0.0 --database_dir ./qdrant_data
files:
- name: embedding_db
path: qdrant_data/embeddings.zip
description: Zip archive containing the Qdrant vector database for the embeddings
- pipeline:
name: assistant-pipeline
nodes:
- name: embeddings
type: execution
step: create-embeddings
- name: manual-evaluation
type: execution
step: do-query
override:
parameters:
- name: question
default: ["who is Michael Jordan?", "what is a dataset?", "hello", "how to create a model?"]
edges:
- [embeddings.output.*, manual-evaluation.input.embedding_db]
- pipeline:
name: assistant-pipeline-with-deployment
nodes:
- name: embeddings
type: execution
step: create-embeddings
- name: manual-evaluation
type: execution
step: do-query
override:
parameters:
- name: question
default: ["who is Michael Jordan?", "what is a dataset?", "hello", "how to create a model?"]
- name: deploy
type: deployment
deployment: public
endpoints: [ask]
actions:
- when: node-starting
then: require-approval
edges:
- [embeddings.output.*, manual-evaluation.input.embedding_db]
- [embeddings.output.*, deploy.file.ask.embedding_db]