Repository navigation
Release Notes
This public release contains the definition and documentation of
- knowledge-base 0.2.0
- qa-assistant-manage 0.2.0
- qa-assistant-service 0.2.0
The API definition(s) are based on
- Commonalities r4.4 (0.9.0)
- Identity and Consent Management r4.2 (0.5.0)
knowledge-base 0.2.0
knowledge-base 0.2.0 is an initial public version of this API.
Changes documented below are compared to version 0.1.0.
- API definition with inline documentation:
Breaking changes
listKnowledgeBases: the 200 response changed from an array ofKnowledgeBaseto an object with the required propertiesitemsandpaginationby @lihaojie-CMCC in #33 and #54uploadDocument: the 201 response body changed from{ "message": ... }to the newDocumentresource by @lihaojie-CMCC in #54uploadDocument: the required scope changed fromknowledge-base:documents:updatetoknowledge-base:documents:createby @lihaojie-CMCC in #33- The document
formatenum values changed from lowercase (doc,pdf,txt,csv) to uppercase (DOC,PDF,TXT,CSV) by @lihaojie-CMCC in #33 updateKnowledgeBase: the HTTP method changed fromPUTtoPATCHby @lihaojie-CMCC in #54 and #63- Error codes:
INVALID_DOCUMENT_FORMATandMISSING_REQUIRED_PARAM(400) were replaced byINVALID_ARGUMENT, andKNOWLEDGE_BASE_NOT_FOUND(404) byNOT_FOUNDby @lihaojie-CMCC in #33 and #71
Added
- New tool operations
createTool,listTools,getTool,updateTool,deleteToolandcallTool, with the scopesknowledge-base:tools:create,knowledge-base:tools:read,knowledge-base:tools:update,knowledge-base:tools:deleteandknowledge-base:tools:callby @lihaojie-CMCC in #33, #54, #63 and #85- The tool
urlmust usehttps. The protections an API provider MUST enforce for outbound tool calls are documented in the new "Security considerations" section. - The tool
headersfield iswriteOnly: it is accepted oncreateToolandupdateTooland not returned bygetToolorlistTools. Credentials for the upstream tool are supplied in custom headers (e.g.X-Api-Key), not inAuthorization. callToolreports the outcome of the upstream tool in the HTTP 200ToolCallResponse(success,statusCode,contextCode), with the context codesKNOWLEDGE_BASE.TOOL_EXECUTION_FAILED,KNOWLEDGE_BASE.TOOL_TIMEOUTandKNOWLEDGE_BASE.TOOL_RATE_LIMITED. Invalid arguments and disabled tools are rejected with HTTP 422 (KNOWLEDGE_BASE.TOOL_INVALID_INPUT,KNOWLEDGE_BASE.TOOL_DISABLED).createToolreturns409 ALREADY_EXISTSfor a duplicate tool name, andupdateToolreturns409 ABORTEDon concurrent modification.
- The tool
- New document operations
getDocumentanddeleteDocument, with the scopesknowledge-base:documents:readandknowledge-base:documents:deleteby @lihaojie-CMCC in #54 - New
Documentschema (documentId,knowledgeBaseId,filename,format,uploadDate,status), used byuploadDocument,getDocumentandKnowledgeBase.documents. Thestatus(PROCESSING,READY,FAILED) reflects the indexing; onlyREADYdocuments are used for answer generation.uploadDocumentalso returns aLocationheader by @lihaojie-CMCC in #54 listKnowledgeBases: new optional query parameterspageandperPageby @lihaojie-CMCC in #33createKnowledgeBase: new409 ALREADY_EXISTSresponse for a duplicatenameby @lihaojie-CMCC in #54 and #63- New
401 UNAUTHENTICATEDresponse on all operations by @lihaojie-CMCC in #33 - Test definitions: 159 scenarios in 14 feature files, one per operation (version 0.1.0: 12 scenarios in one file) by @lihaojie-CMCC in #33, #34, #54, #63, #77, #83 and #92
Changed
listKnowledgeBasesnow returns a paginated object. This is a breaking change (see Breaking changes above).uploadDocumentnow returns aDocumentresource and requires the scopeknowledge-base:documents:create. This is a breaking change (see Breaking changes above).- The document
formatenum values are now uppercase. This is a breaking change (see Breaking changes above). updateKnowledgeBasenow usesPATCHand is documented as a partial update: omitted fields are left unchanged, and an empty body is rejected with400 INVALID_ARGUMENT. This is a breaking change (see Breaking changes above).- Error codes were aligned with the standard CAMARA error codes. This is a breaking change (see Breaking changes above).
- Aligned with Commonalities r4.4 (0.9.0), from 0.6 in version 0.1.0: unknown request body properties are now rejected with
400 INVALID_ARGUMENTby @lihaojie-CMCC in #33, #63 and #71 knowledgeBaseIdis now declared withformat: uuid; string and array properties gotmaxLength/maxItemsbounds, e.g.name255,description4096, uploadeddocument10485760 bytes by @lihaojie-CMCC in #33
Fixed
- N/A
Removed
- The documented
500response was removed from all operations by @lihaojie-CMCC in #83
qa-assistant-manage 0.2.0
qa-assistant-manage 0.2.0 is an initial public version of this API.
Changes documented below are compared to version 0.1.0.
- API definition with inline documentation:
Breaking changes
listAssistants: the 200 response changed from an array ofAssistantto an object with the required propertiesitemsandpaginationby @lihaojie-CMCC in #33 and #54createAssistantandupdateAssistant: the response changed from theAssistantResponseenvelope (success,assistantId,message) to theAssistantresource; theAssistantResponseschema was removed by @lihaojie-CMCC in #54largeModelParameters: the nestedparametersobject was removed and its properties were renamed.parameters.temperature,parameters.max_tokensandparameters.top_pare nowtemperature,maxTokensandtopPdirectly underlargeModelParameters;maxTokensnow has a maximum of 128000 by @lihaojie-CMCC in #33 and #54updateAssistant: the HTTP method changed fromPUTtoPATCHby @lihaojie-CMCC in #54 and #63getAssistant: the required scope changed fromknowledge-base:documents:updatetoqa-assistant-manage:assistants:readby @lihaojie-CMCC in #33- Error codes:
INVALID_PARAMETER_VALUEandMISSING_REQUIRED_PARAM(400),INVALID_TOKEN_CONTEXT(403), andASSISTANT_NOT_FOUNDandIDENTIFIER_NOT_FOUND(404) were removed. The operations returnINVALID_ARGUMENTorOUT_OF_RANGE(400),PERMISSION_DENIED(403) andNOT_FOUND(404) by @lihaojie-CMCC in #33 and #71
Added
- New optional
toolIdsproperty onAssistantCreateRequest,AssistantUpdateRequestandAssistant, to associate tools of theknowledge-baseAPI with an assistant by @lihaojie-CMCC in #33 and #54createAssistantandupdateAssistantreturn422withKNOWLEDGE_BASE.TOOL_NOT_FOUNDorKNOWLEDGE_BASE.TOOL_CROSS_KBfor a tool ID that does not exist or belongs to another knowledge base.- The ID of a deleted tool is dropped from
toolIdson the next read of the assistant.
listAssistants: new optional query parameterspageandperPageby @lihaojie-CMCC in #33- New
401 UNAUTHENTICATEDresponse on all operations by @lihaojie-CMCC in #33 - Test definitions: 46 scenarios in
qa-assistant-manage.feature(version 0.1.0: 8 scenarios) by @lihaojie-CMCC in #33, #54, #77, #82 and #83
Changed
listAssistantsnow returns a paginated object. This is a breaking change (see Breaking changes above).createAssistantandupdateAssistantnow return theAssistantresource. This is a breaking change (see Breaking changes above).largeModelParameterswas flattened and its properties were renamed. This is a breaking change (see Breaking changes above).updateAssistantnow usesPATCHand is documented as a partial update: omitted fields are left unchanged, andlargeModelParametersandtoolIdsare replaced as a whole when provided. This is a breaking change (see Breaking changes above).- Error codes were aligned with the standard CAMARA error codes. This is a breaking change (see Breaking changes above).
- Values outside the bounds of
temperature,maxTokensandtopPare now rejected with400 OUT_OF_RANGEby @lihaojie-CMCC in #33 and #63 - Aligned with Commonalities r4.4 (0.9.0), from 0.6 in version 0.1.0: unknown request body properties are now rejected with
400 INVALID_ARGUMENTby @lihaojie-CMCC in #33, #63 and #71 - The
assistantIdpath parameter andknowledgeBaseIdare now declared withformat: uuid; string properties gotmaxLengthbounds by @lihaojie-CMCC in #33
Fixed
- The scope declared for
getAssistantwas corrected fromknowledge-base:documents:updatetoqa-assistant-manage:assistants:read(breaking change, see Breaking changes above) by @lihaojie-CMCC in #33
Removed
- The documented
500response was removed from all operations by @lihaojie-CMCC in #83
qa-assistant-service 0.2.0
qa-assistant-service 0.2.0 is an initial public version of this API.
Changes documented below are compared to version 0.1.0.
- API definition with inline documentation:
Breaking changes
QueryResponse.finished: the enum values changed fromStop,Length,Error,FiltertoSTOP,LENGTH,ERROR,FILTERby @lihaojie-CMCC in #33- Error codes:
INVALID_ASSISTANT_IDandMISSING_PROMPT(400),INVALID_TOKEN_CONTEXT(403), andASSISTANT_NOT_FOUNDandIDENTIFIER_NOT_FOUND(404) were removed.queryAssistantreturnsINVALID_ARGUMENTorOUT_OF_RANGE(400),PERMISSION_DENIED(403) andNOT_FOUND(404) by @lihaojie-CMCC in #33 and #71
Added
queryAssistant: tools associated with the assistant viatoolIdsmay be invoked automatically during answer generation. Tool invocations are not surfaced inQueryResponse, and a tool failure does not change the HTTP status by @lihaojie-CMCC in #33 and #54- New
401 UNAUTHENTICATEDresponse by @lihaojie-CMCC in #33 - Test definitions: 26 scenarios in
qa-assistant-service.feature(version 0.1.0: 11 scenarios) by @lihaojie-CMCC in #33, #77, #83 and #93
Changed
- The
QueryResponse.finishedenum values are now uppercase. This is a breaking change (see Breaking changes above). - Error codes were aligned with the standard CAMARA error codes. This is a breaking change (see Breaking changes above).
- Documented the relationship between
successandfinishedinQueryResponse:STOPandLENGTHmeansuccess=true,ERRORandFILTERmeansuccess=false; the HTTP status is200for every value offinishedby @lihaojie-CMCC in #54 - Only documents with
status = READYin the associated knowledge bases are used for answer generation by @lihaojie-CMCC in #54 - Aligned with Commonalities r4.4 (0.9.0), from 0.6 in version 0.1.0: unknown request body properties are now rejected with
400 INVALID_ARGUMENTby @lihaojie-CMCC in #33, #63 and #71
Fixed
- N/A
Removed
- The documented
500response was removed from the operation by @lihaojie-CMCC in #83
Full Changelog: r1.2...r2.3