3_llmops-aifoundry/3_2_prototyping/chat-serverless/flow.dag.yaml (46 lines of code) (raw):
$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json
environment:
python_requirements_txt: requirements.txt
inputs:
question:
type: string
is_chat_input: true
default: What is the capital of France?
context:
type: string
is_chat_input: false
default: TrailMaster X4 Tent is a durable polyester tent
outputs:
phi35_answer:
type: string
reference: ${phi35.output}
is_chat_output: false
gpt4o_answer:
type: string
reference: ${gpt4o.output}
is_chat_output: true
nodes:
- name: phi35
type: python
source:
type: code
path: phi35_chatcompletion.py
inputs:
connection: replace with your connection name
question: ${inputs.question}
context: ${inputs.context}
- name: gpt4o
type: llm
source:
type: code
path: chat.jinja2
inputs:
deployment_name: gpt-4o
temperature: 0.2
top_p: 1
max_tokens: 512
question: ${inputs.question}
connection: replace with your connection name
api: chat
module: promptflow.tools.aoai
use_variants: false