-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflow.dag.yaml
85 lines (85 loc) · 1.94 KB
/
flow.dag.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
id: bring_your_own_data_qna
name: Bring Your Own Data QnA
inputs:
question:
type: string
default: How to use SDK V2?
is_chat_input: false
outputs:
output:
type: string
reference: ${answer_the_question_with_context.output}
nodes:
- name: query2embedding
type: python
source:
type: package
tool: promptflow.tools.embedding.embedding
inputs:
connection: aoi-gpt35-embed-connection
deployment_name: embed
input: ${inputs.question}
use_variants: false
- name: set_env_vars
type: python
source:
type: code
path: set_env_vars.py
inputs:
dummy_arg: ${inputs.question}
use_variants: false
- name: lookup_ai_search
type: python
source:
type: code
path: lookup_ai_search.py
inputs:
config: ${set_env_vars.output}
embedding: ${query2embedding.output}
use_variants: false
- name: generate_prompt_context
type: python
source:
type: code
path: generate_prompt_context.py
inputs:
search_result: ${lookup_ai_search.output}
use_variants: false
- name: Prompt_variants
use_variants: true
- name: answer_the_question_with_context
type: llm
source:
type: code
path: answer_the_question_with_context.jinja2
inputs:
deployment_name: gpt35
temperature: 0
top_p: 1
max_tokens: 1000
response_format:
type: text
presence_penalty: 0
frequency_penalty: 0
prompt_text: ${Prompt_variants.output}
provider: AzureOpenAI
connection: aoi-gpt35-embed-connection
api: chat
module: promptflow.tools.aoai
use_variants: false
node_variants:
Prompt_variants:
default_variant_id: variant_0
variants:
variant_0:
node:
name: Prompt_variants
type: prompt
source:
type: code
path: Prompt_variants.jinja2
inputs:
contexts: ${generate_prompt_context.output}
question: ${inputs.question}
environment:
python_requirements_txt: requirements.txt