TXYZ
TXYZ · GPT Actions
txyz.ai GPTs Actions
POST /document/gpts/docs/{document_id}/contextGet Relevant ContextGet chunks of a document that are most relevant to the input query.
GET /document/gpts/docs/{document_id}/generate_summaryGenerate SummaryGet the generated summary of a document.
GET /document/gpts/docs/{document_id}/infoGet InfoGet the meta info of a document.
GET /document/gpts/docs/{document_id}/keywordsFetch KeywordsGet or generate keywords for a document.
POST /document/gpts/fetchFetchFetch a document from an external URL, PDF is the only supported document type. If the document is fetched successfully, a document object will be returned.
POST /document/gpts/searchSearchSearch for documents. GENERAL searches across all research papers repository using keywords provided in query. Supports as_ylo and as_yhi, to filter results by year. SPECIFIC search is similar to google search, it searches for a specific paper using title, author, year etc.
原始 API 定义
{
"servers": [
{
"url": "https://gpt.txyz.ai"
}
],
"components": {
"schemas": {
"Document": {
"description": "Model for a single Document.",
"properties": {
"created_at": {
"description": "created date",
"format": "date-time",
"title": "Created At",
"type": "string"
},
"generated_summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "generated summary of the document",
"title": "Generated Summary"
},
"id": {
"description": "document id",
"format": "uuid4",
"title": "Id",
"type": "string"
},
"is_private": {
"default": false,
"description": "document is private or not",
"title": "Is Private",
"type": "boolean"
},
"meta_data": {
"anyOf": [
{
"$ref": "#/components/schemas/DocumentMetaData"
},
{
"type": "null"
}
],
"description": "meta data of the document"
},
"session_id": {
"anyOf": [
{
"format": "uuid4",
"type": "string"
},
{
"type": "null"
}
],
"description": "[deprecated]id of the session this document belongs to for the user",
"title": "Session Id"
},
"source_meta_data": {
"anyOf": [
{
"$ref": "#/components/schemas/DocumentSourceMetaData"
},
{
"type": "null"
}
],
"description": "meta data of the document source"
},
"summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "summary of the document",
"title": "Summary"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "title of the document",
"title": "Title"
},
"updated_at": {
"description": "updated date",
"format": "date-time",
"title": "Updated At",
"type": "string"
}
},
"required": [
"id",
"created_at",
"updated_at",
"title",
"summary",
"meta_data",
"source_meta_data"
],
"title": "Document",
"type": "object"
},
"DocumentFileTypes": {
"description": "Enum for document file type.",
"enum": [
"PDF",
"PNG",
"JPG",
"JPEG",
"XLSX",
"XLS",
"DOCX",
"DOC"
],
"title": "DocumentFileTypes",
"type": "string"
},
"DocumentMetaData": {
"description": "Model for a single DocumentMetaData.",
"properties": {
"authors": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "list of authors",
"title": "Authors"
},
"categories": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "list of categories",
"title": "Categories"
},
"hash": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "hash of the document",
"title": "Hash"
},
"keywords": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"description": "list of keywords",
"title": "Keywords"
},
"published_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"description": "published date",
"title": "Published At"
},
"submitted_at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"description": "last submitted date",
"title": "Submitted At"
}
},
"title": "DocumentMetaData",
"type": "object"
},
"DocumentSourceMetaData": {
"description": "Model for a single DocumentSourceMeta.",
"properties": {
"arxiv_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "ARXIV type only. Arxiv id of the document",
"title": "Arxiv Id"
},
"file_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "UPLOAD type only. Name of the uploaded file",
"title": "File Name"
},
"file_type": {
"anyOf": [
{
"$ref": "#/components/schemas/DocumentFileTypes"
},
{
"type": "null"
}
],
"default": "PDF",
"description": "Type of the file. Default is PDF"
},
"type": {
"anyOf": [
{
"$ref": "#/components/schemas/DocumentSourceType"
},
{
"type": "null"
}
],
"description": "source type of the document"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "ARXIV and URL type only. URL of the document",
"title": "Url"
}
},
"required": [
"type"
],
"title": "DocumentSourceMetaData",
"type": "object"
},
"DocumentSourceType": {
"description": "Enum for document source type.",
"enum": [
"ARXIV",
"URL",
"UPLOAD"
],
"title": "DocumentSourceType",
"type": "string"
},
"ExternalLink": {
"description": "Model for an external search link result.",
"properties": {
"authors": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"title": "Authors"
},
"link": {
"title": "Link",
"type": "string"
},
"number_of_citations": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"title": "Number Of Citations"
},
"pdf_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Pdf Url"
},
"snippet": {
"title": "Snippet",
"type": "string"
},
"summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Summary"
},
"title": {
"title": "Title",
"type": "string"
}
},
"required": [
"title",
"link",
"snippet"
],
"title": "ExternalLink",
"type": "object"
},
"FetchDocumentRequest": {
"properties": {
"light": {
"default": false,
"title": "Light",
"type": "boolean"
},
"url": {
"format": "uri",
"minLength": 1,
"title": "Url",
"type": "string"
}
},
"required": [
"url"
],
"title": "FetchDocumentRequest",
"type": "object"
},
"GetRelevantContextRequest": {
"properties": {
"query": {
"title": "Query",
"type": "string"
}
},
"required": [
"query"
],
"title": "GetRelevantContextRequest",
"type": "object"
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
},
"RelevantContextResponse": {
"properties": {
"relevant_context": {
"items": {
"type": "string"
},
"title": "Relevant Context",
"type": "array"
}
},
"required": [
"relevant_context"
],
"title": "RelevantContextResponse",
"type": "object"
},
"SearchRequest": {
"properties": {
"limit": {
"default": 1,
"title": "Limit",
"type": "integer"
},
"parameters": {
"default": {},
"title": "Parameters",
"type": "object"
},
"query": {
"title": "Query",
"type": "string"
},
"search_type": {
"allOf": [
{
"$ref": "#/components/schemas/SearchType"
}
],
"default": "general"
}
},
"required": [
"query"
],
"title": "SearchRequest",
"type": "object"
},
"SearchResponse": {
"properties": {
"search_results": {
"items": {
"$ref": "#/components/schemas/SearchResult"
},
"title": "Search Results",
"type": "array"
}
},
"required": [
"search_results"
],
"title": "SearchResponse",
"type": "object"
},
"SearchResult": {
"description": "Model for a single SearchResult.",
"properties": {
"document": {
"anyOf": [
{
"$ref": "#/components/schemas/Document"
},
{
"type": "null"
}
]
},
"external_link": {
"$ref": "#/components/schemas/ExternalLink"
}
},
"required": [
"external_link"
],
"title": "SearchResult",
"type": "object"
},
"SearchType": {
"description": "Search Type.",
"enum": [
"general",
"specific"
],
"title": "SearchType",
"type": "string"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"title": "Location",
"type": "array"
},
"msg": {
"title": "Message",
"type": "string"
},
"type": {
"title": "Error Type",
"type": "string"
}
},
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError",
"type": "object"
}
},
"securitySchemes": {
"HTTPBearer": {
"scheme": "bearer",
"type": "http"
}
}
},
"info": {
"title": "txyz.ai GPTs Actions",
"version": "1.0"
},
"openapi": "3.1.0",
"paths": {
"/document/gpts/docs/{document_id}/context": {
"post": {
"description": "Get chunks of a document that are most relevant to the input query.",
"operationId": "get_relevant_context_docs__document_id__context_post",
"parameters": [
{
"in": "path",
"name": "document_id",
"required": true,
"schema": {
"format": "uuid4",
"title": "Document Id",
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetRelevantContextRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RelevantContextResponse"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"security": [
{
"HTTPBearer": []
}
],
"summary": "Get Relevant Context",
"x-openai-isConsequential": true,
"tags": [
"gpts"
]
}
},
"/document/gpts/docs/{document_id}/generate_summary": {
"get": {
"description": "Get the generated summary of a document.",
"operationId": "generate_summary_docs__document_id__generate_summary_get",
"parameters": [
{
"in": "path",
"name": "document_id",
"required": true,
"schema": {
"format": "uuid4",
"title": "Document Id",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Generate Summary",
"tags": [
"gpts"
]
}
},
"/document/gpts/docs/{document_id}/info": {
"get": {
"description": "Get the meta info of a document.",
"operationId": "get_info_docs__document_id__info_get",
"parameters": [
{
"in": "path",
"name": "document_id",
"required": true,
"schema": {
"format": "uuid4",
"title": "Document Id",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Document"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Get Info",
"tags": [
"gpts"
]
}
},
"/document/gpts/docs/{document_id}/keywords": {
"get": {
"description": "Get or generate keywords for a document.",
"operationId": "fetch_keywords_docs__document_id__keywords_get",
"parameters": [
{
"in": "path",
"name": "document_id",
"required": true,
"schema": {
"format": "uuid4",
"title": "Document Id",
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Fetch Keywords",
"tags": [
"gpts"
]
}
},
"/document/gpts/fetch": {
"post": {
"description": "Fetch a document from an external URL, PDF is the only supported document type.\nIf the document is fetched successfully, a document object will be returned.",
"operationId": "fetch_fetch_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FetchDocumentRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Document"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"security": [
{
"HTTPBearer": []
}
],
"summary": "Fetch",
"x-openai-isConsequential": true,
"tags": [
"gpts"
]
}
},
"/document/gpts/search": {
"post": {
"description": "Search for documents. GENERAL searches across all research papers repository using keywords provided in query. Supports as_ylo and as_yhi, to filter results by year. SPECIFIC search is similar to google search, it searches for a specific paper using title, author, year etc.",
"operationId": "search_search_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SearchRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SearchResponse"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"security": [
{
"HTTPBearer": []
}
],
"summary": "Search",
"x-openai-isConsequential": true,
"tags": [
"gpts"
]
}
}
}
}