Skip to content

r2.3

Latest

Choose a tag to compare

@camara-release-automation camara-release-automation released this 20 Nov 01:26
85b3f6d

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.

Breaking changes

  • listKnowledgeBases: the 200 response changed from an array of KnowledgeBase to an object with the required properties items and pagination by @lihaojie-CMCC in #33 and #54
  • uploadDocument: the 201 response body changed from { "message": ... } to the new Document resource by @lihaojie-CMCC in #54
  • uploadDocument: the required scope changed from knowledge-base:documents:update to knowledge-base:documents:create by @lihaojie-CMCC in #33
  • The document format enum values changed from lowercase (doc, pdf, txt, csv) to uppercase (DOC, PDF, TXT, CSV) by @lihaojie-CMCC in #33
  • updateKnowledgeBase: the HTTP method changed from PUT to PATCH by @lihaojie-CMCC in #54 and #63
  • Error codes: INVALID_DOCUMENT_FORMAT and MISSING_REQUIRED_PARAM (400) were replaced by INVALID_ARGUMENT, and KNOWLEDGE_BASE_NOT_FOUND (404) by NOT_FOUND by @lihaojie-CMCC in #33 and #71

Added

  • New tool operations createTool, listTools, getTool, updateTool, deleteTool and callTool, with the scopes knowledge-base:tools:create, knowledge-base:tools:read, knowledge-base:tools:update, knowledge-base:tools:delete and knowledge-base:tools:call by @lihaojie-CMCC in #33, #54, #63 and #85
    • The tool url must use https. The protections an API provider MUST enforce for outbound tool calls are documented in the new "Security considerations" section.
    • The tool headers field is writeOnly: it is accepted on createTool and updateTool and not returned by getTool or listTools. Credentials for the upstream tool are supplied in custom headers (e.g. X-Api-Key), not in Authorization.
    • callTool reports the outcome of the upstream tool in the HTTP 200 ToolCallResponse (success, statusCode, contextCode), with the context codes KNOWLEDGE_BASE.TOOL_EXECUTION_FAILED, KNOWLEDGE_BASE.TOOL_TIMEOUT and KNOWLEDGE_BASE.TOOL_RATE_LIMITED. Invalid arguments and disabled tools are rejected with HTTP 422 (KNOWLEDGE_BASE.TOOL_INVALID_INPUT, KNOWLEDGE_BASE.TOOL_DISABLED).
    • createTool returns 409 ALREADY_EXISTS for a duplicate tool name, and updateTool returns 409 ABORTED on concurrent modification.
  • New document operations getDocument and deleteDocument, with the scopes knowledge-base:documents:read and knowledge-base:documents:delete by @lihaojie-CMCC in #54
  • New Document schema (documentId, knowledgeBaseId, filename, format, uploadDate, status), used by uploadDocument, getDocument and KnowledgeBase.documents. The status (PROCESSING, READY, FAILED) reflects the indexing; only READY documents are used for answer generation. uploadDocument also returns a Location header by @lihaojie-CMCC in #54
  • listKnowledgeBases: new optional query parameters page and perPage by @lihaojie-CMCC in #33
  • createKnowledgeBase: new 409 ALREADY_EXISTS response for a duplicate name by @lihaojie-CMCC in #54 and #63
  • New 401 UNAUTHENTICATED response 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

  • listKnowledgeBases now returns a paginated object. This is a breaking change (see Breaking changes above).
  • uploadDocument now returns a Document resource and requires the scope knowledge-base:documents:create. This is a breaking change (see Breaking changes above).
  • The document format enum values are now uppercase. This is a breaking change (see Breaking changes above).
  • updateKnowledgeBase now uses PATCH and is documented as a partial update: omitted fields are left unchanged, and an empty body is rejected with 400 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_ARGUMENT by @lihaojie-CMCC in #33, #63 and #71
  • knowledgeBaseId is now declared with format: uuid; string and array properties got maxLength / maxItems bounds, e.g. name 255, description 4096, uploaded document 10485760 bytes by @lihaojie-CMCC in #33

Fixed

  • N/A

Removed

  • The documented 500 response 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.

Breaking changes

  • listAssistants: the 200 response changed from an array of Assistant to an object with the required properties items and pagination by @lihaojie-CMCC in #33 and #54
  • createAssistant and updateAssistant: the response changed from the AssistantResponse envelope (success, assistantId, message) to the Assistant resource; the AssistantResponse schema was removed by @lihaojie-CMCC in #54
  • largeModelParameters: the nested parameters object was removed and its properties were renamed. parameters.temperature, parameters.max_tokens and parameters.top_p are now temperature, maxTokens and topP directly under largeModelParameters; maxTokens now has a maximum of 128000 by @lihaojie-CMCC in #33 and #54
  • updateAssistant: the HTTP method changed from PUT to PATCH by @lihaojie-CMCC in #54 and #63
  • getAssistant: the required scope changed from knowledge-base:documents:update to qa-assistant-manage:assistants:read by @lihaojie-CMCC in #33
  • Error codes: INVALID_PARAMETER_VALUE and MISSING_REQUIRED_PARAM (400), INVALID_TOKEN_CONTEXT (403), and ASSISTANT_NOT_FOUND and IDENTIFIER_NOT_FOUND (404) were removed. The operations return INVALID_ARGUMENT or OUT_OF_RANGE (400), PERMISSION_DENIED (403) and NOT_FOUND (404) by @lihaojie-CMCC in #33 and #71

Added

  • New optional toolIds property on AssistantCreateRequest, AssistantUpdateRequest and Assistant, to associate tools of the knowledge-base API with an assistant by @lihaojie-CMCC in #33 and #54
    • createAssistant and updateAssistant return 422 with KNOWLEDGE_BASE.TOOL_NOT_FOUND or KNOWLEDGE_BASE.TOOL_CROSS_KB for a tool ID that does not exist or belongs to another knowledge base.
    • The ID of a deleted tool is dropped from toolIds on the next read of the assistant.
  • listAssistants: new optional query parameters page and perPage by @lihaojie-CMCC in #33
  • New 401 UNAUTHENTICATED response 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

  • listAssistants now returns a paginated object. This is a breaking change (see Breaking changes above).
  • createAssistant and updateAssistant now return the Assistant resource. This is a breaking change (see Breaking changes above).
  • largeModelParameters was flattened and its properties were renamed. This is a breaking change (see Breaking changes above).
  • updateAssistant now uses PATCH and is documented as a partial update: omitted fields are left unchanged, and largeModelParameters and toolIds are 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, maxTokens and topP are now rejected with 400 OUT_OF_RANGE by @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_ARGUMENT by @lihaojie-CMCC in #33, #63 and #71
  • The assistantId path parameter and knowledgeBaseId are now declared with format: uuid; string properties got maxLength bounds by @lihaojie-CMCC in #33

Fixed

  • The scope declared for getAssistant was corrected from knowledge-base:documents:update to qa-assistant-manage:assistants:read (breaking change, see Breaking changes above) by @lihaojie-CMCC in #33

Removed

  • The documented 500 response 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.

Breaking changes

  • QueryResponse.finished: the enum values changed from Stop, Length, Error, Filter to STOP, LENGTH, ERROR, FILTER by @lihaojie-CMCC in #33
  • Error codes: INVALID_ASSISTANT_ID and MISSING_PROMPT (400), INVALID_TOKEN_CONTEXT (403), and ASSISTANT_NOT_FOUND and IDENTIFIER_NOT_FOUND (404) were removed. queryAssistant returns INVALID_ARGUMENT or OUT_OF_RANGE (400), PERMISSION_DENIED (403) and NOT_FOUND (404) by @lihaojie-CMCC in #33 and #71

Added

  • queryAssistant: tools associated with the assistant via toolIds may be invoked automatically during answer generation. Tool invocations are not surfaced in QueryResponse, and a tool failure does not change the HTTP status by @lihaojie-CMCC in #33 and #54
  • New 401 UNAUTHENTICATED response 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.finished enum 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 success and finished in QueryResponse: STOP and LENGTH mean success=true, ERROR and FILTER mean success=false; the HTTP status is 200 for every value of finished by @lihaojie-CMCC in #54
  • Only documents with status = READY in 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_ARGUMENT by @lihaojie-CMCC in #33, #63 and #71

Fixed

  • N/A

Removed

  • The documented 500 response was removed from the operation by @lihaojie-CMCC in #83

Full Changelog: r1.2...r2.3