Commit b9d1f783 authored by Wade's avatar Wade

swagger post chat

parent 102348d1
openapi: 3.0.4 openapi: 3.0.4
info: info:
title: Sample API title: Genkit Chat API
description: Optional multiline or single-line description in [CommonMark](http://commonmark.org/help/) or HTML. description: API for interacting with a chat endpoint powered by Genkit.
version: 0.1.9 version: 0.1.0
servers:
- url: http://api.example.com/v1
description: Optional server description, e.g. Main (production) server
- url: http://staging-api.example.com
description: Optional server description, e.g. Internal staging server for testing
paths: paths:
/users: /chat:
get: post:
summary: Returns a list of users. summary: Send a chat message
description: Optional extended description in CommonMark or HTML. description: Sends a chat message to the Genkit AI workflow and returns a response.
tags:
- Chat
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
content:
type: string
description: The chat message content
example: "What is the capital of UK?"
model:
type: string
description: The model to use for the chat response
example: "gpt-3.5-turbo"
apiKey:
type: string
description: The API key for authentication
example: "sk-1234567890abcdef"
username:
type: string
description: The username of the requester
example: "john_doe"
user_id:
type: string
description: The unique identifier for the user
example: "user_12345"
required:
- content
responses: responses:
"200": # status code '200':
description: A JSON array of user names description: Successful response with the chat answer
content:
application/json:
schema:
type: object
properties:
response:
type: string
description: The response from the chat workflow
example: "The capital of the UK is London."
'400':
description: Invalid input
content: content:
application/json: application/json:
schema: schema:
type: array type: object
items: properties:
error:
type: string type: string
description: Error message
example: "Invalid request body"
components:
schemas: {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment