id: template_chat_flow
name: Template Chat Flow
environment:
  python_requirements_txt: requirements.txt
inputs:
  chat_history:
    type: list
  question:
    type: string
    is_chat_input: true
outputs:
  answer:
    type: string
    reference: ${summarize.output}
    is_chat_output: true
nodes:
- name: chat
  type: llm
  source:
    type: code
    path: chat.jinja2
  inputs:
    max_tokens: 256
    temperature: 0.7
    chat_history: ${inputs.chat_history}
    question: ${inputs.question}
    model: gpt-3.5-turbo
  connection: openai_agi_class
  api: chat
- name: summarize
  type: llm
  source:
    type: code
    path: summarize.jinja2
  inputs:
    model: gpt-3.5-turbo
    text: ${chat.output}
  connection: openai_agi_class
  api: chat
