3_llmops-aifoundry/3_2_prototyping/flow-template/chat-serverless.flow.dag.yaml (47 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:
deployment_name: Phi-3.5-mini-instruct
connection: {{your_phi35_serverless_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: {{your_gpt4o_connection_name}}
api: chat
module: promptflow.tools.aoai
use_variants: false