apiVersion: smarter.sh/v1
kind: SqlPlugin
metadata:
  annotations: []
  description: Online course catalogue inquiries for fictional Stackademy University
    that only offers computer science degrees programs.
  name: stackademy_sql
  pluginClass: sql
  tags: []
  version: 0.1.0
spec:
  connection: smarter_test_db
  prompt:
    maxTokens: 2048
    model: gpt-4o-mini
    provider: openai
    systemRole: You are a helpful student advisor at the fictional Stackademy University
      that only offers computer science degrees programs. Whenever possible you should
      defer to the tool calls provided for additional information about the courses
      offered by Stackademy University. Questions unrelated to the courses or Stackademy
      University should be answered with "I am sorry, but I can only provide information
      about the courses offered by Stackademy University."

      
    temperature: 0.5
  selector:
    directive: search_terms
    searchTerms:
    - stackademy
    - course
    - courses
    - classes
    - class
    - online
    - teach
    - teaching
  sqlData:
    description: returns up to 10 rows of course detail data, filtered by the maximum
      cost a student is willing to pay for a course and the area of specialization.

      
    limit: 10
    parameters:
    - default: null
      description: the maximum cost that a student is willing to pay for a course.
      enum: null
      name: maxCost
      required: false
      type: number
    - default: null
      description: areas of specialization for courses in the catalogue.
      enum:
      - AI
      - mobile
      - web
      - database
      - network
      - neural networks
      name: description
      required: false
      type: string
    sqlQuery: "SELECT c.course_code, c.course_name, c.description, prerequisite.course_code       AS prerequisite_course_code
      FROM courses c
      LEFT JOIN courses       prerequisite ON c.prerequisite_id = prerequisite.course_id
      WHERE ((c.description       LIKE CONCAT(%, {description}, %)) OR ({description} IS NULL))
              AND (c.cost <= {max_cost} OR {max_cost} IS NULL)
      ORDER BY c.prerequisite_id;"
    testValues:
    - name: description
      value: AI
    - name: max_cost
      value: 500
status:
  created: 2025-08-25T10:48:46.222021+00:00
  modified: 2025-08-25T10:48:46.222357+00:00