External Pipeline Requirements
External pipeline detailed requirements
Overview
External services must implement specific requirements to be compatible with GLChat's external pipeline registration feature. This guide covers the core API endpoints, attachment handling, and conversation history support.
Key Requirements
Implement
/verifyendpoint - For registration and metadata retrievalImplement
/responsesendpoint - OpenAI-compatible Responses API interfaceSupport header authentication - For API key validation
Return valid JSON responses - With required fields
Support attachment handling - For file-based queries (Optional)
Support conversation history --- For multi-turn conversations (Optional)
Required Endpoints
1. Service Discovery Endpoint
Endpoint: GET /verify
Purpose: Called by GLChat during pipeline registration to verify connectivity and retrieve service metadata.
Request Headers:
X-API-Key
{api_key}
Yes
API key for authentication
Response Schema:
Field Specifications:
name
string
Yes
Non-empty after stripping whitespace
version
string
Yes
Non-empty after stripping whitespace
description
string
No
Optional, string if provided
model_names
string[]
No
Optional, array of non-empty strings if provided
supports_attachments
boolean
No
Whether the pipeline accepts file attachments
supported_file_types
dict
No
File type categories with extensions
max_file_size
integer
No
Maximum file size in bytes
max_file_count
integer
No
Maximum number of files per request
⚠️ Notes: The model names for external pipeline are currently not used in GLChat. This will be addressed as a future enhancement.
2. Responses Endpoint
Endpoint: POST /responses
Purpose: Called by GLChat during chatbot conversations to generate AI responses. Supports simple queries and multi-turn conversations with attachments.
Note:
GLChat uses OpenAI's newer Responses API (not the legacy Chat Completions API).
The service should support streaming modes
The service
/responsesshould mimic OpenAI Responses. Here's guides from OpenAI https://developers.openai.com/api/reference/resources/responses/methods/create
Example
For example, follow instructions on External Pipeline Main Section
⚠️ Disclaimer: The attached code is just a minimum dummy example
Last updated