{"openapi":"3.1.0","info":{"title":"ConstructorKnowledgeModel","version":"0.1.0"},"servers":[{"url":"https://constructor.app/api/platform-kmapi","description":"Knowledge model API"}],"paths":{"/alive":{"get":{"summary":"Respond if authorized, do not respond on any error","description":"Respond if ok, do not respond on any error","operationId":"get_alive_response","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSchema"},"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}}}}},"421":{"description":"User is banned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSchema"},"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}}}}}}}}},"/v1/knowledge-models":{"get":{"summary":"List knowledge models","description":"List knowledge models owned by user making the request.","operationId":"list_kmapi_knowledge_models","parameters":[{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelListSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"User is banned","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Creates a new knowledge model.","description":"This endpoint initializes a new knowledge model for organizing and managing structured information.","operationId":"create_kmapi_knowledge_model","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}":{"delete":{"summary":"Delete knowledge model","description":"Delete knowledge model by id.","operationId":"delete_kmapi_knowledge_model","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get knowledge model","description":"Get knowledge model by id.","operationId":"get_kmapi_knowledge_model","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update knowledge model","description":"Update knowledge model by id","operationId":"patch_knowledge_model","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/settings":{"get":{"summary":"Get knowledge model settings","description":"Get knowledge model settings by its id","operationId":"get_knowledge_model_settings","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelSettingsSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update knowledge model settings","description":"Update knowledge model settings by its id","operationId":"patch_knowledge_model_settings","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelSettingsPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelSettingsSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/configuration":{"get":{"summary":"Get Knowledge Model Configuration","description":"Get knowledge model configuration by its id","operationId":"get_kmapi_knowledge_model_configuration","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelAPIConfigSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Knowledge Model Configuration not found":{"summary":"The knowledge model configuration specified does not exist.","value":{"details":{"msg":"Knowledge Model Configuration not found","error_code":190008}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Update Knowledge Model Configuration","description":"Update knowledge model configuration by its id","operationId":"update_kmapi_knowledge_model_configuration","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelConfigurationPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelAPIConfigSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/reindex":{"post":{"summary":"Reindex knowledge model files","description":"We can manually reindex knowledge model files","operationId":"reindex_knowledge_model_files","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexConfiguration","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/reindex/meta":{"post":{"summary":"Reindex knowledge model files meta step","description":"We can manually reindex knowledge model files meta step","operationId":"reindex_knowledge_model_files_meta","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexConfiguration","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/reindex/graph":{"post":{"summary":"Reindex knowledge model files graph step","description":"We can manually reindex knowledge model files graph step","operationId":"reindex_knowledge_model_files_graph","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReindexConfiguration","default":{}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/reindex/bm25":{"post":{"summary":"Reindex knowledge model bm25 step","description":"We can manually reindex knowledge model bm25 step","operationId":"reindex_knowledge_model_bm25","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/document-groups":{"post":{"summary":"Create new document group","description":"Create new document group and return it.","operationId":"create_document_group","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGroupCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGroupSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get list of document groups","description":"Get list of document groups for current knowledge model.","operationId":"list_document_groups","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGroupListSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/document-groups/{group_id}":{"get":{"summary":"Get document group","description":"Get document group by external ID.","operationId":"get_document_group","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGroupSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Document group not found":{"summary":"Document group specified in request does not exist.","value":{"details":{"msg":"Document group not found","error_code":190017}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update document group","description":"Update document group by external ID.","operationId":"patch_document_group","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGroupPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentGroupSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Document group not found":{"summary":"Document group specified in request does not exist.","value":{"details":{"msg":"Document group not found","error_code":190017}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete document group","description":"Delete document group by external ID.","operationId":"delete_document_group","parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","title":"Group Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Document group not found":{"summary":"Document group specified in request does not exist.","value":{"details":{"msg":"Document group not found","error_code":190017}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/documents":{"post":{"summary":"Upload a file to the knowledge model","description":"Upload a file to the knowledge model via multipart upload","operationId":"upload_file_to_knowledge_model","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_file_to_knowledge_model"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Document group not found":{"summary":"Document group specified in request does not exist.","value":{"details":{"msg":"Document group not found","error_code":190017}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/documents/{document_external_id}":{"get":{"summary":"Returns document","description":"Returns a document data.","operationId":"get_document","parameters":[{"name":"document_external_id","in":"path","required":true,"schema":{"type":"string","title":"Document External Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Document is not found":{"summary":"Document specified in request does not exist.","value":{"details":{"msg":"Document is not found","error_code":190016}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete document","description":"Delete document by id.","operationId":"delete_document","parameters":[{"name":"document_external_id","in":"path","required":true,"schema":{"type":"string","title":"Document External Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Document is not found":{"summary":"Document specified in request does not exist.","value":{"details":{"msg":"Document is not found","error_code":190016}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/chat-sessions":{"post":{"summary":"Create new chat session via API","description":"Create a new chat session via API","operationId":"create_chat_session_api","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionCreateAPI"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"LLM not found":{"summary":"LLM specified in request does not exist.","value":{"details":{"msg":"LLM not found","error_code":190010}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get all chat sessions for given Knowledge Model","description":"Get all chat sessions linked to a knowledge model","operationId":"list_chat_sessions","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionListSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/chat-sessions/{chat_session_id}":{"get":{"summary":"Get chat session","description":"Retrieve a chat session information by id","operationId":"get_chat_session","parameters":[{"name":"chat_session_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Session Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Knowledge model chat session not found":{"summary":"Knowledge model chat session specified in request does not exist.","value":{"details":{"msg":"Knowledge model chat session not found","error_code":190002}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete chat session","description":"Delete chat session.","operationId":"delete_chat_session","parameters":[{"name":"chat_session_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Session Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Knowledge model chat session not found":{"summary":"Knowledge model chat session specified in request does not exist.","value":{"details":{"msg":"Knowledge model chat session not found","error_code":190002}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch chat session","description":"Patch chat session by id.","operationId":"patch_chat_session","parameters":[{"name":"chat_session_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Session Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessagePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatSessionSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Knowledge model chat session not found":{"summary":"Knowledge model chat session specified in request does not exist.","value":{"details":{"msg":"Knowledge model chat session not found","error_code":190002}}},"Knowledge model file not found":{"summary":"Knowledge model file specified in request does not exist.","value":{"details":{"msg":"Knowledge model file not found","error_code":190006}}},"Chat session patch not allowed":{"summary":"The chat session has messages.","value":{"details":{"msg":"Chat session patch not allowed","error_code":190009}}},"LLM not found":{"summary":"LLM specified in request does not exist.","value":{"details":{"msg":"LLM not found","error_code":190010}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/chat-sessions/{chat_session_id}/messages":{"post":{"summary":"Create new chat message","description":"Create a new chat message and start reply generation","operationId":"create_chat_message","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}},{"name":"chat_session_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageUserSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Knowledge model chat session not found":{"summary":"Knowledge model chat session specified in request does not exist.","value":{"details":{"msg":"Knowledge model chat session not found","error_code":190002}}},"LLM not found":{"summary":"LLM specified in request does not exist.","value":{"details":{"msg":"LLM not found","error_code":190010}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Get all messages from chat session","description":"Get all messages from chat session","operationId":"get_chat_messages_list","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}},{"name":"chat_session_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Session Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageListSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Knowledge model chat session not found":{"summary":"Knowledge model chat session specified in request does not exist.","value":{"details":{"msg":"Knowledge model chat session not found","error_code":190002}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/chat-sessions/{chat_session_id}/messages/{message_id}":{"get":{"summary":"Get chat message","description":"Get chat message by its identifier.","operationId":"get_chat_message","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}},{"name":"chat_session_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Session Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ChatMessageUserSchema"},{"$ref":"#/components/schemas/ChatMessageBotSchema"}],"title":"Response Get Chat Message"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Knowledge model chat session not found":{"summary":"Knowledge model chat session specified in request does not exist.","value":{"details":{"msg":"Knowledge model chat session not found","error_code":190002}}},"Knowledge model chat message not found":{"summary":"Knowledge model chat message specified in request does not exist.","value":{"details":{"msg":"Knowledge model chat message not found","error_code":190003}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/chat-sessions/{chat_session_id}/messages/{message_id}/feedback":{"post":{"summary":"Set feedback on bot message","description":"Set feedback on bot message","operationId":"patch_chat_message","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}},{"name":"chat_session_id","in":"path","required":true,"schema":{"type":"string","title":"Chat Session Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageFeedback"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatMessageBotSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Knowledge model chat session not found":{"summary":"Knowledge model chat session specified in request does not exist.","value":{"details":{"msg":"Knowledge model chat session not found","error_code":190002}}},"Knowledge model chat message not found":{"summary":"Knowledge model chat message specified in request does not exist.","value":{"details":{"msg":"Knowledge model chat message not found","error_code":190003}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/files":{"get":{"summary":"List files of the knowledge model","description":"List files of the knowledge model","operationId":"kmapi_get_file_metadata","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KMFileMetadataListSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"summary":"Upload a file to the knowledge model","description":"Upload a file to the knowledge model via multipart upload","operationId":"kmapi_upload_file_to_knowledge_model","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_kmapi_upload_file_to_knowledge_model"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KMFileMetadataSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/files/{file_id}":{"get":{"summary":"Download a file from a knowledge model","description":"Download a file from a knowledge model by file identifier","operationId":"kmapi_download_file_from_knowledge_model","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Knowledge model file not found":{"summary":"Knowledge model file specified in request does not exist.","value":{"details":{"msg":"Knowledge model file not found","error_code":190006}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete a file from a knowledge model","description":"Schedules file removal from a knowledge model","operationId":"kmapi_delete_file_from_knowledge_model","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Knowledge model file not found":{"summary":"Knowledge model file specified in request does not exist.","value":{"details":{"msg":"Knowledge model file not found","error_code":190006}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/files/{file_id}/metadata":{"get":{"summary":"Returns metadata of the file","description":"Returns metadata of the file","operationId":"kmapi_get_file_metadata","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KMFileMetadataSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Knowledge model file not found":{"summary":"Knowledge model file specified in request does not exist.","value":{"details":{"msg":"Knowledge model file not found","error_code":190006}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update metadata of the file","description":"Update metadata of the file","operationId":"kmapi_patch_file_metadata","parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileMetadataParameter"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KMFileMetadataSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Knowledge model file not found":{"summary":"Knowledge model file specified in request does not exist.","value":{"details":{"msg":"Knowledge model file not found","error_code":190006}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/internal-documents":{"post":{"summary":"Create new internal document","description":"Create new internal document and return it. Only model owner can manage internal documents.","operationId":"create_internal_document","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalDocumentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalDocumentSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List internal documents","description":"List all internal documents for the knowledge model. Only model owner can access internal documents.","operationId":"list_internal_documents","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalDocumentListSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/internal-documents/{document_id}":{"get":{"summary":"Get internal document","description":"Get internal document by ID. Only model owner can access internal documents.","operationId":"get_internal_document","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalDocumentSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Internal document not found":{"summary":"Internal document specified in request does not exist.","value":{"details":{"msg":"Internal document not found","error_code":190006}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update internal document","description":"Update internal document by ID. Only model owner can manage internal documents.","operationId":"patch_internal_document","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalDocumentPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalDocumentSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Internal document not found":{"summary":"Internal document specified in request does not exist.","value":{"details":{"msg":"Internal document not found","error_code":190006}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete internal document","description":"Delete internal document by ID. Only model owner can manage internal documents.","operationId":"delete_internal_document","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Internal document not found":{"summary":"Internal document specified in request does not exist.","value":{"details":{"msg":"Internal document not found","error_code":190006}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/internal-documents/{document_id}/chunks":{"post":{"summary":"Create new internal chunk","description":"Create new internal chunk for a internal document and return it. Only model owner can manage internal documents and chunks.","operationId":"create_internal_chunk","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalChunkCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChunkSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Internal document not found":{"summary":"Internal document specified in request does not exist.","value":{"details":{"msg":"Internal document not found","error_code":190006}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List internal chunks","description":"List all internal chunks for a internal document. Only model owner can access internal documents and chunks.","operationId":"list_internal_chunks","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__responses__chunk__ChunkListSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Internal document not found":{"summary":"Internal document specified in request does not exist.","value":{"details":{"msg":"Internal document not found","error_code":190006}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/internal-documents/{document_id}/chunks/batch":{"post":{"summary":"Batch create internal chunks","description":"Create multiple internal chunks at once. Only model owner can manage internal documents and chunks.","operationId":"create_batch_internal_chunks","parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalChunkBatchCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__responses__chunk__ChunkListSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Internal document not found":{"summary":"Internal document specified in request does not exist.","value":{"details":{"msg":"Internal document not found","error_code":190006}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/internal-documents/{document_id}/chunks/{chunk_id}":{"get":{"summary":"Get internal chunk","description":"Get internal chunk by ID. Only model owner can manage internal documents and chunks.","operationId":"get_internal_chunk_endpoint","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"string","title":"Chunk Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChunkSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Internal document not found":{"summary":"Internal document specified in request does not exist.","value":{"details":{"msg":"Internal document not found","error_code":190006}}},"Chunk not found":{"summary":"Chunk specified in request does not exist.","value":{"details":{"msg":"Chunk not found","error_code":190015}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Update internal chunk","description":"Update internal chunk by ID. Only model owner can manage internal documents and chunks.","operationId":"patch_internal_chunk","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"string","title":"Chunk Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalChunkPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChunkSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Internal document not found":{"summary":"Internal document specified in request does not exist.","value":{"details":{"msg":"Internal document not found","error_code":190006}}},"Chunk not found":{"summary":"Chunk specified in request does not exist.","value":{"details":{"msg":"Chunk not found","error_code":190015}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete internal chunk","description":"Delete internal chunk by ID. Only model owner can manage internal documents and chunks.","operationId":"delete_internal_chunk","parameters":[{"name":"chunk_id","in":"path","required":true,"schema":{"type":"string","title":"Chunk Id"}},{"name":"document_id","in":"path","required":true,"schema":{"type":"string","title":"Document Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Internal document not found":{"summary":"Internal document specified in request does not exist.","value":{"details":{"msg":"Internal document not found","error_code":190006}}},"Chunk not found":{"summary":"Chunk specified in request does not exist.","value":{"details":{"msg":"Chunk not found","error_code":190015}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/widget":{"get":{"summary":"Get the knowledge model widget settings","description":"Get the knowledge model widget settings","operationId":"get_widget","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch knowledge model widget settings","description":"Update the widget settings for the knowledge model","operationId":"patch_widget","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WidgetSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/chunks":{"get":{"summary":"List document chunks","description":"List document chunks with filtering options. Returns raw, unprocessed text chunks from the knowledge model.","operationId":"list_chunks","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}},{"name":"document_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by specific document ID","title":"Document Id"},"description":"Filter by specific document ID"},{"name":"document_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/DocumentType"},{"type":"null"}],"description":"Filter by document type","title":"Document Type"},"description":"Filter by document type"},{"name":"content_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ChunkContentType"},{"type":"null"}],"description":"Filter by chunk content type","title":"Content Type"},"description":"Filter by chunk content type"},{"name":"sort","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortingOptions","description":"Sort by field, e.g. 'chunk_index'","default":"chunk_index"},"description":"Sort by field, e.g. 'chunk_index'"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__responses_kmapi__chunk__ChunkListSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/chunks/search":{"post":{"summary":"Search for raw text chunks","description":"Returns raw, unprocessed text chunks from the knowledge model based on the embedded query.","operationId":"search_chunks_endpoint","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChunkSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChunkSearchResponseSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Error occurred during chunk search":{"summary":"Error occurred during chunk search","value":{"details":{"msg":"Error occurred during chunk search","error_code":190022}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/videos/import":{"post":{"summary":"Add video document into Model","description":"Add video document into Model.","operationId":"video_import","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoImportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelVideoSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"We couldn't access the video. It may be private, deleted, or the link is incorrect. Please verify and try again":{"summary":"Couldn't access the video file by link.","value":{"details":{"msg":"We couldn't access the video. It may be private, deleted, or the link is incorrect. Please verify and try again","error_code":190018}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/videos":{"get":{"summary":"List videos in the knowledge model","description":"List all video documents in the knowledge model with pagination support.","operationId":"list_videos","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelVideoListSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Document is not found":{"summary":"Document specified in request does not exist.","value":{"details":{"msg":"Document is not found","error_code":190016}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/videos/{document_external_id}/transcription":{"get":{"summary":"Get video transcription","description":"Get the transcription for a specific video.","operationId":"get_video_transcription","parameters":[{"name":"document_external_id","in":"path","required":true,"schema":{"type":"string","title":"Document External Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranscriptionResponseSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Document is not found":{"summary":"Document specified in request does not exist.","value":{"details":{"msg":"Document is not found","error_code":190016}}},"Failed to process transcription chunk.":{"summary":"An error occurred while decoding or extracting required fields from a transcription chunk. Possible causes include invalid JSON format, missing keys, or incorrect data types.","value":{"details":{"msg":"Failed to process transcription chunk.","error_code":190020}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/videos/{document_external_id}":{"get":{"summary":"Get video document","description":"Get video file imported to knowledge model","operationId":"get_video_file","parameters":[{"name":"document_external_id","in":"path","required":true,"schema":{"type":"string","title":"Document External Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelVideoSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Document is not found":{"summary":"Document specified in request does not exist.","value":{"details":{"msg":"Document is not found","error_code":190016}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"summary":"Patch video document","description":"Patch video file imported to knowledge model","operationId":"patch_video_file","parameters":[{"name":"document_external_id","in":"path","required":true,"schema":{"type":"string","title":"Document External Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelVideoDocumentPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnowledgeModelVideoSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Document is not found":{"summary":"Document specified in request does not exist.","value":{"details":{"msg":"Document is not found","error_code":190016}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete video document","description":"Delete video document by id.","operationId":"delete_video_document","parameters":[{"name":"document_external_id","in":"path","required":true,"schema":{"type":"string","title":"Document External Id"}},{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"Document is not found":{"summary":"Document specified in request does not exist.","value":{"details":{"msg":"Document is not found","error_code":190016}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/chat/completions/{extension}":{"post":{"summary":"Generates text responses based on incoming messages.","description":"This endpoint generates relevant text responses based on the content of incoming messages.","operationId":"langhain_compatible_completion","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}},{"name":"extension","in":"path","required":true,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extension"}},{"name":"X-KM-Extension","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Km-Extension"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionParameters"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CompletionResponseSchema-Output"},{"$ref":"#/components/schemas/CompletionStreamingEvent-Output"},{"$ref":"#/components/schemas/CompletionErrorSchema-Output"}],"title":"Response Langhain Compatible Completion"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"LLM not found":{"summary":"LLM specified in request does not exist.","value":{"details":{"msg":"LLM not found","error_code":190010}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/chat/completions":{"post":{"summary":"Generates text responses based on incoming messages.","description":"This endpoint generates relevant text responses based on the content of incoming messages.","operationId":"langhain_compatible_completion","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}},{"name":"extension","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Extension"}},{"name":"X-KM-Extension","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Km-Extension"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionParameters"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CompletionResponseSchema-Output"},{"$ref":"#/components/schemas/CompletionStreamingEvent-Output"},{"$ref":"#/components/schemas/CompletionErrorSchema-Output"}],"title":"Response Langhain Compatible Completion"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"LLM not found":{"summary":"LLM specified in request does not exist.","value":{"details":{"msg":"LLM not found","error_code":190010}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/knowledge-models/{knowledge_model_id}/tools/translation":{"post":{"summary":"English translation tool.","description":"Translate a list of English texts into the selected language.","operationId":"translation_endpoint","parameters":[{"name":"knowledge_model_id","in":"path","required":true,"schema":{"type":"string","title":"Knowledge Model Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslationResponseSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"LLM not found":{"summary":"LLM specified in request does not exist.","value":{"details":{"msg":"LLM not found","error_code":190010}}},"Error occurred during text translation":{"summary":"Error occurred during text translation","value":{"details":{"msg":"Error occurred during text translation","error_code":190023}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/language_models":{"get":{"summary":"List language models","description":"List language models you can use in chat sessions","operationId":"list_kmapi_language_models","parameters":[{"name":"mode","in":"query","required":false,"schema":{"$ref":"#/components/schemas/LLMListResponseMode","default":"default"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LlmListSchema-Output"},{"$ref":"#/components/schemas/LlmOpenAIListSchema-Output"}],"title":"Response List Kmapi Language Models"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"421":{"description":"User is banned","content":{"application/json":{"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}}},"schema":{"$ref":"#/components/schemas/ErrorSchema"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/directllm/chat/completions":{"post":{"summary":"Generates text responses based on incoming messages.","description":"This endpoint generates relevant text responses based on the content of incoming messages.","operationId":"langchain_compatible_completion","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompletionParameters"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CompletionResponseSchema-Output"},{"$ref":"#/components/schemas/CompletionStreamingEvent-Output"},{"$ref":"#/components/schemas/CompletionErrorSchema-Output"}],"title":"Response Langchain Compatible Completion"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSchema"},"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}}}}},"421":{"description":"Various errors, see examples","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSchema"},"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}},"Invalid parameters":{"summary":"Parameters passed to endpoint are incorrect. Check info for parameter names.","value":{"details":{"msg":"Invalid parameters","error_code":10001}}},"Knowledge model not found":{"summary":"Knowledge model specified in request does not exist.","value":{"details":{"msg":"Knowledge model not found","error_code":190001}}},"LLM not found":{"summary":"LLM specified in request does not exist.","value":{"details":{"msg":"LLM not found","error_code":190010}}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/users/licensed-features":{"get":{"summary":"Get licensed features of user","description":"Get licensed features of user","operationId":"list_user_licensed_features","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LicensedFeaturesListResponseSchema"}}}},"401":{"description":"User token is not present in cookies or has incorrect value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSchema"},"examples":{"Token is invalid":{"summary":"User token is not present in cookies or has incorrect value.","value":{"details":{"msg":"Token is invalid","error_code":20001}}}}}}},"421":{"description":"User is banned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorSchema"},"examples":{"User is banned":{"summary":"User is banned","value":{"details":{"msg":"User is banned","error_code":20002}}}}}}}}}}},"components":{"schemas":{"Body_kmapi_upload_file_to_knowledge_model":{"properties":{"folder":{"type":"string","title":"Folder","default":""},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_kmapi_upload_file_to_knowledge_model"},"Body_upload_file_to_knowledge_model":{"properties":{"document_type":{"type":"string","title":"Document Type","default":"conference"},"group_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Id"},"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_file_to_knowledge_model"},"ChatExtension":{"type":"string","enum":["explorer","optative_rag","conference_assistant","food_safety_assistant","digital_twin","direct_llm","compliance_assistant","pandasai","career_adviser","extended_rag","re_act_km_chat","lms_search","avatar"],"title":"ChatExtension"},"ChatMessageBotContentText-Input":{"properties":{"type":{"type":"string","title":"Type","default":"text"},"text":{"type":"string","title":"Text"},"references":{"items":{"$ref":"#/components/schemas/MessageReference"},"type":"array","title":"References"},"documents":{"items":{"$ref":"#/components/schemas/MessageDocument-Input"},"type":"array","title":"Documents"},"links":{"items":{"$ref":"#/components/schemas/MessageLink"},"type":"array","title":"Links"}},"additionalProperties":false,"type":"object","required":["text","references","documents","links"],"title":"ChatMessageBotContentText"},"ChatMessageBotContentText-Output":{"properties":{"type":{"type":"string","title":"Type","default":"text"},"text":{"type":"string","title":"Text"},"references":{"items":{"$ref":"#/components/schemas/MessageReference"},"type":"array","title":"References"},"documents":{"items":{"$ref":"#/components/schemas/MessageDocument-Output"},"type":"array","title":"Documents"},"links":{"items":{"$ref":"#/components/schemas/MessageLink"},"type":"array","title":"Links"}},"additionalProperties":false,"type":"object","required":["text","references","documents","links"],"title":"ChatMessageBotContentText"},"ChatMessageBotSchema":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type","default":"ai_message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"included_documents":{"items":{"$ref":"#/components/schemas/ChatSessionDocumentSchema"},"type":"array","title":"Included Documents"},"mode":{"$ref":"#/components/schemas/ChatMessageMode","default":"model"},"status":{"$ref":"#/components/schemas/ChatMessageBotStatus"},"like_status":{"$ref":"#/components/schemas/LikeStatus"},"quick_replies":{"items":{"type":"string"},"type":"array","title":"Quick Replies"},"content":{"$ref":"#/components/schemas/ChatMessageBotContentText-Output"},"llm_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Id"}},"additionalProperties":false,"type":"object","required":["id","created_at","status","like_status","content"],"title":"ChatMessageBotSchema"},"ChatMessageBotStatus":{"properties":{"name":{"$ref":"#/components/schemas/MessageStatus"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"additionalProperties":false,"type":"object","required":["name","message"],"title":"ChatMessageBotStatus"},"ChatMessageCreate":{"properties":{"text":{"type":"string","title":"Text","description":"The message text","examples":["Hello, can you count giraffes in Africa?","What do you know about penguins?","What can you say about material science top research fields?"]},"mode":{"$ref":"#/components/schemas/ChatMessageMode","description":"Chat mode","default":"model","examples":["model","direct","blended"]}},"additionalProperties":false,"type":"object","required":["text"],"title":"ChatMessageCreate"},"ChatMessageListSchema":{"properties":{"results":{"items":{"anyOf":[{"$ref":"#/components/schemas/ChatMessageUserSchema"},{"$ref":"#/components/schemas/ChatMessageBotSchema"}]},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"ChatMessageListSchema"},"ChatMessageMode":{"type":"string","enum":["model","direct","blended"],"title":"ChatMessageMode"},"ChatMessagePatch":{"properties":{"extension":{"anyOf":[{"$ref":"#/components/schemas/ChatExtension"},{"type":"null"}],"description":"Chat extension mode","examples":["explorer","optative_rag","conference_assistant"]},"included_document_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Included Document Ids","description":"Subset of document identifiers used for information retrieval","examples":[["d38c668961ad42aeb3761a8db658e08e","1745f472371d4f17b89e6f111e3c5a2a","87b6179e11bd4fefb1baf50ab0a6c55d"],["06226d40202c44df81ee8529dc1d458b","a4dad8d4c8144599a94f4341c21ff0cd"]]},"llm_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Llm Id","description":"Language model identifier","examples":["9d38cf09f0ff4fe8ab7b2e714adb55b2"]},"mode":{"anyOf":[{"$ref":"#/components/schemas/ChatMessageMode"},{"type":"null"}],"description":"Chat mode","examples":["model","direct","blended"]}},"additionalProperties":false,"type":"object","title":"ChatMessagePatch"},"ChatMessageUserSchema":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type","default":"user_message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"included_documents":{"items":{"$ref":"#/components/schemas/ChatSessionDocumentSchema"},"type":"array","title":"Included Documents"},"mode":{"$ref":"#/components/schemas/ChatMessageMode","default":"model"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"}},"additionalProperties":false,"type":"object","required":["id","created_at","text"],"title":"ChatMessageUserSchema"},"ChatSessionCreateAPI":{"properties":{"llm_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Llm Id","description":"Language model identifier","examples":["9d38cf09f0ff4fe8ab7b2e714adb55b2","gpt-4o-mini","some-llm-id"]},"mode":{"$ref":"#/components/schemas/ChatMessageMode","description":"Chat mode","default":"model","examples":["model","direct","blended"]}},"additionalProperties":false,"type":"object","title":"ChatSessionCreateAPI"},"ChatSessionDocumentSchema":{"properties":{"id":{"type":"string","title":"Id"},"filename":{"type":"string","title":"Filename"},"chat_session_id":{"type":"string","title":"Chat Session Id"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted":{"type":"boolean","title":"Deleted","default":false}},"additionalProperties":false,"type":"object","required":["id","filename","chat_session_id","updated_at"],"title":"ChatSessionDocumentSchema"},"ChatSessionListSchema":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ChatSessionSchema"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"ChatSessionListSchema"},"ChatSessionSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"knowledge_model_id":{"type":"string","title":"Knowledge Model Id"},"llm_id":{"type":"string","title":"Llm Id"},"extension":{"anyOf":[{"$ref":"#/components/schemas/ChatExtension"},{"type":"null"}]},"included_documents":{"items":{"$ref":"#/components/schemas/ChatSessionDocumentSchema"},"type":"array","title":"Included Documents"},"session_origin":{"$ref":"#/components/schemas/SessionOrigin"},"mode":{"$ref":"#/components/schemas/ChatMessageMode","default":"model"}},"additionalProperties":false,"type":"object","required":["id","name","knowledge_model_id","llm_id","extension","session_origin"],"title":"ChatSessionSchema"},"ChunkContentType":{"type":"string","enum":["text","json","table","image","transcript","dataframe"],"title":"ChunkContentType"},"ChunkResult":{"properties":{"id":{"type":"string","title":"Id","description":"ID of the chunk"},"document_id":{"type":"string","title":"Document Id","description":"ID of the document this chunk belongs to"},"text":{"type":"string","title":"Text","description":"Full, unaltered chunk content"},"content_type":{"$ref":"#/components/schemas/ChunkContentType","description":"Content type of the chunk"},"document_page":{"type":"integer","title":"Document Page","description":"Page number in the document"},"chunk_index":{"type":"integer","title":"Chunk Index","description":"Index of the chunk in the document"}},"additionalProperties":false,"type":"object","required":["id","document_id","text","content_type","document_page","chunk_index"],"title":"ChunkResult"},"ChunkSchema":{"properties":{"id":{"type":"string","title":"Id","description":"External ID of the chunk"},"content_type":{"$ref":"#/components/schemas/ChunkContentType","description":"Content type of the chunk"},"content_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Source","description":"Source of the content"},"document_chunk_index":{"type":"integer","title":"Document Chunk Index","description":"Chunk index in the document part"},"text":{"type":"string","title":"Text","description":"Text content of the chunk"},"embedding_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Key","description":"Text content of the chunk which will be used for embedding"},"priority":{"type":"integer","title":"Priority","description":"Priority of the chunk","default":1},"embedding":{"type":"boolean","title":"Embedding","description":"Whether the chunk has embedding","default":false}},"additionalProperties":false,"type":"object","required":["id","content_type","document_chunk_index","text"],"title":"ChunkSchema"},"ChunkSearchRequest":{"properties":{"query":{"type":"string","title":"Query","description":"The search query"},"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K","description":"Maximum number of chunks to retrieve","default":10},"included_document_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Included Document Ids","description":"List of document IDs to include in the search"}},"additionalProperties":false,"type":"object","required":["query"],"title":"ChunkSearchRequest"},"ChunkSearchResponseSchema":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ChunkSearchResult"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"ChunkSearchResponseSchema"},"ChunkSearchResult":{"properties":{"id":{"type":"string","title":"Id","description":"ID of the chunk"},"document_id":{"type":"string","title":"Document Id","description":"ID of the document"},"text":{"type":"string","title":"Text","description":"Full, unaltered chunk content"},"content_type":{"$ref":"#/components/schemas/ChunkContentType","description":"Content type of the chunk"},"document_page":{"type":"integer","title":"Document Page","description":"Page number in the document"},"chunk_index":{"type":"integer","title":"Chunk Index","description":"Index of the chunk in the document"},"similarity_score":{"type":"number","title":"Similarity Score","description":"Similarity score between the query and chunk"}},"additionalProperties":false,"type":"object","required":["id","document_id","text","content_type","document_page","chunk_index","similarity_score"],"title":"ChunkSearchResult"},"CitationFile":{"properties":{"type":{"type":"string","const":"file_citation","title":"Type","default":"file_citation"},"start_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Index"},"end_index":{"type":"integer","title":"End Index"},"text_quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Quote","default":""},"file_id":{"type":"string","title":"File Id"},"filename":{"type":"string","title":"Filename"}},"type":"object","required":["end_index","file_id","filename"],"title":"CitationFile"},"CitationUrl":{"properties":{"type":{"type":"string","const":"url_citation","title":"Type","default":"url_citation"},"start_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Index"},"end_index":{"type":"integer","title":"End Index"},"text_quote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Quote","default":""},"url":{"type":"string","title":"Url"},"title":{"type":"string","title":"Title"}},"type":"object","required":["end_index","url","title"],"title":"CitationUrl"},"CompletionChoiceContent-Input":{"properties":{"content":{"type":"string","title":"Content","description":"The content of the current chunk."},"role":{"type":"string","title":"Role","description":"The role of the message sender, typically 'assistant'.","default":"assistant"},"additional_kwargs":{"$ref":"#/components/schemas/CompletionKwargs","description":"Additional arguments with citations"}},"additionalProperties":false,"type":"object","required":["content","additional_kwargs"],"title":"CompletionChoiceContent"},"CompletionChoiceContent-Output":{"properties":{"content":{"type":"string","title":"Content","description":"The content of the current chunk."},"role":{"type":"string","title":"Role","description":"The role of the message sender, typically 'assistant'.","default":"assistant"},"additional_kwargs":{"$ref":"#/components/schemas/CompletionKwargs","description":"Additional arguments with citations"}},"additionalProperties":false,"type":"object","required":["content","additional_kwargs"],"title":"CompletionChoiceContent"},"CompletionChoiceMessage-Input":{"properties":{"role":{"type":"string","title":"Role","description":"The role of the message sender, typically 'assistant'.","default":"assistant"},"content":{"type":"string","title":"Content","description":"The content of the message."},"tool_calls":{"type":"null","title":"Tool Calls","description":"This field is currently always None, but may be changed later."},"additional_kwargs":{"$ref":"#/components/schemas/CompletionKwargs","description":"Additional arguments with citations"}},"additionalProperties":false,"type":"object","required":["content","additional_kwargs"],"title":"CompletionChoiceMessage"},"CompletionChoiceMessage-Output":{"properties":{"role":{"type":"string","title":"Role","description":"The role of the message sender, typically 'assistant'.","default":"assistant"},"content":{"type":"string","title":"Content","description":"The content of the message."},"tool_calls":{"type":"null","title":"Tool Calls","description":"This field is currently always None, but may be changed later."},"additional_kwargs":{"$ref":"#/components/schemas/CompletionKwargs","description":"Additional arguments with citations"}},"additionalProperties":false,"type":"object","required":["content","additional_kwargs"],"title":"CompletionChoiceMessage"},"CompletionErrorDetailSchema":{"properties":{"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"The error code indicating the type of error."},"message":{"type":"string","title":"Message","description":"A detailed message describing the error."},"type":{"$ref":"#/components/schemas/CompletionErrorType","description":"The type of the error.","examples":["invalid_request_error","authentication_error","rate_limit_error"]}},"additionalProperties":false,"type":"object","required":["code","message","type"],"title":"CompletionErrorDetailSchema"},"CompletionErrorSchema-Input":{"properties":{"error":{"$ref":"#/components/schemas/CompletionErrorDetailSchema","description":"Detailed description of the error."}},"additionalProperties":false,"type":"object","required":["error"],"title":"CompletionErrorSchema"},"CompletionErrorSchema-Output":{"properties":{"error":{"$ref":"#/components/schemas/CompletionErrorDetailSchema","description":"Detailed description of the error."}},"additionalProperties":false,"type":"object","required":["error"],"title":"CompletionErrorSchema"},"CompletionErrorType":{"type":"string","enum":["invalid_request_error","authentication_error","rate_limit_error"],"title":"CompletionErrorType"},"CompletionKwargs":{"properties":{"citations":{"items":{"oneOf":[{"$ref":"#/components/schemas/CitationFile"},{"$ref":"#/components/schemas/CitationUrl"}],"discriminator":{"propertyName":"type","mapping":{"file_citation":"#/components/schemas/CitationFile","url_citation":"#/components/schemas/CitationUrl"}}},"type":"array","title":"Citations"}},"type":"object","required":["citations"],"title":"CompletionKwargs"},"CompletionMessage":{"properties":{"role":{"$ref":"#/components/schemas/CompletionMessageType","description":"The origin type of the message.","examples":["system","user","assistant"]},"content":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"string"}],"title":"Content","description":"The content of the message."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"An optional name for the message.","examples":["First message","Question about the unlimited possibilities of AI"]}},"additionalProperties":false,"type":"object","required":["role","content"],"title":"CompletionMessage"},"CompletionMessageType":{"type":"string","enum":["system","user","assistant"],"title":"CompletionMessageType"},"CompletionParameters":{"properties":{"model":{"type":"string","title":"Model","description":"Alias of the LLM to be used in the chat session.","default":"default"},"messages":{"items":{"$ref":"#/components/schemas/CompletionMessage"},"type":"array","title":"Messages","description":"List of messages representing the chat history."},"temperature":{"anyOf":[{"type":"number","maximum":2.0,"minimum":0.0},{"type":"null"}],"title":"Temperature","description":"What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic."},"max_completion_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Completion Tokens","description":"The maximum number of tokens that can be generated in the completion."},"top_p":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Top P","description":"An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered."},"frequency_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":-2.0},{"type":"null"}],"title":"Frequency Penalty","description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim."},"presence_penalty":{"anyOf":[{"type":"number","maximum":2.0,"minimum":-2.0},{"type":"null"}],"title":"Presence Penalty","description":"Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics."},"stop":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stop","description":"This field is not handled in the code."},"stream":{"type":"boolean","title":"Stream","description":"Response generation in stream mode.","default":false},"tools":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tools","description":"This field is not handled in the code."},"tool_choice":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tool Choice","description":"This field is not handled in the code."},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N","description":"This field is not handled in the code."},"response_format":{"anyOf":[{"$ref":"#/components/schemas/StructuredOutputJsonSchemaBase"},{"type":"null"}],"description":"Structured JSON output schema."},"search_domain_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Search Domain Filter","description":"List of domain names to filter the search results. If not provided, all domains will be searched. Perplexity only"},"search_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Mode","description":"The search mode to use. Possible value is 'academic'. Perplexity only"},"disable_search":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Disable Search","description":"Flag to disable search functionality. Perplexity only"},"media_response":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Media Response","description":"Media response configuration. Perplexity only"}},"additionalProperties":true,"type":"object","required":["messages"],"title":"CompletionParameters"},"CompletionResponseChoice-Input":{"properties":{"index":{"type":"integer","title":"Index","description":"Index of the response chunk."},"message":{"$ref":"#/components/schemas/CompletionChoiceMessage-Input","description":"Partial content of the response chunk."},"finish_reason":{"anyOf":[{"$ref":"#/components/schemas/StopReason"},{"type":"null"}],"description":"Explanation of why the response generation was finished.","examples":["stop","length","tool_calls","invalid_json_schema"]}},"additionalProperties":false,"type":"object","required":["index","message"],"title":"CompletionResponseChoice"},"CompletionResponseChoice-Output":{"properties":{"index":{"type":"integer","title":"Index","description":"Index of the response chunk."},"message":{"$ref":"#/components/schemas/CompletionChoiceMessage-Output","description":"Partial content of the response chunk."},"finish_reason":{"anyOf":[{"$ref":"#/components/schemas/StopReason"},{"type":"null"}],"description":"Explanation of why the response generation was finished.","examples":["stop","length","tool_calls","invalid_json_schema"]}},"additionalProperties":false,"type":"object","required":["index","message"],"title":"CompletionResponseChoice"},"CompletionResponseSchema-Input":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the message."},"object":{"type":"string","title":"Object","description":"Type of the current schema. Only 'chat.completion' is allowed.","default":"chat.completion"},"created":{"type":"integer","title":"Created","description":"Timestamp of when the message was created, in UTC."},"model":{"type":"string","title":"Model","description":"Alias of the LLM used in the chat session."},"choices":{"items":{"$ref":"#/components/schemas/CompletionResponseChoice-Input"},"type":"array","title":"Choices","description":"List of messages in the response."},"usage":{"$ref":"#/components/schemas/CompletionUsageSchema","description":"The number of tokens used by the LLM for message generation."},"citations":{"items":{"type":"string"},"type":"array","title":"Citations","description":"List of citations related to the streaming message."},"search_results":{"items":{"$ref":"#/components/schemas/SearchResult"},"type":"array","title":"Search Results","description":"List of search results related to the streaming message."},"images":{"items":{"$ref":"#/components/schemas/ImageResult"},"type":"array","title":"Images","description":"List of images related to the streaming message."},"videos":{"items":{"$ref":"#/components/schemas/VideoResult"},"type":"array","title":"Videos","description":"List of videos related to the streaming message."}},"additionalProperties":false,"type":"object","required":["id","model","usage"],"title":"CompletionResponseSchema"},"CompletionResponseSchema-Output":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the message."},"object":{"type":"string","title":"Object","description":"Type of the current schema. Only 'chat.completion' is allowed.","default":"chat.completion"},"created":{"type":"integer","title":"Created","description":"Timestamp of when the message was created, in UTC."},"model":{"type":"string","title":"Model","description":"Alias of the LLM used in the chat session."},"choices":{"items":{"$ref":"#/components/schemas/CompletionResponseChoice-Output"},"type":"array","title":"Choices","description":"List of messages in the response."},"usage":{"$ref":"#/components/schemas/CompletionUsageSchema","description":"The number of tokens used by the LLM for message generation."},"citations":{"items":{"type":"string"},"type":"array","title":"Citations","description":"List of citations related to the streaming message."},"search_results":{"items":{"$ref":"#/components/schemas/SearchResult"},"type":"array","title":"Search Results","description":"List of search results related to the streaming message."},"images":{"items":{"$ref":"#/components/schemas/ImageResult"},"type":"array","title":"Images","description":"List of images related to the streaming message."},"videos":{"items":{"$ref":"#/components/schemas/VideoResult"},"type":"array","title":"Videos","description":"List of videos related to the streaming message."}},"additionalProperties":false,"type":"object","required":["id","model","usage"],"title":"CompletionResponseSchema"},"CompletionStreamingChoice-Input":{"properties":{"index":{"type":"integer","title":"Index","description":"Index of the response chunk."},"delta":{"$ref":"#/components/schemas/CompletionChoiceContent-Input","description":"Partial content of the response chunk."},"finish_reason":{"anyOf":[{"$ref":"#/components/schemas/StopReason"},{"type":"null"}],"description":"Explanation of why the response generation was finished.","examples":["stop","length","tool_calls","invalid_json_schema"]}},"additionalProperties":false,"type":"object","required":["index","delta"],"title":"CompletionStreamingChoice"},"CompletionStreamingChoice-Output":{"properties":{"index":{"type":"integer","title":"Index","description":"Index of the response chunk."},"delta":{"$ref":"#/components/schemas/CompletionChoiceContent-Output","description":"Partial content of the response chunk."},"finish_reason":{"anyOf":[{"$ref":"#/components/schemas/StopReason"},{"type":"null"}],"description":"Explanation of why the response generation was finished.","examples":["stop","length","tool_calls","invalid_json_schema"]}},"additionalProperties":false,"type":"object","required":["index","delta"],"title":"CompletionStreamingChoice"},"CompletionStreamingEvent-Input":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the message."},"object":{"type":"string","title":"Object","description":"Type of the current schema. Only 'chat.completion.chunk' is allowed.","default":"chat.completion.chunk"},"model":{"type":"string","title":"Model","description":"Alias of the LLM used in the chat session."},"created":{"type":"integer","title":"Created","description":"Timestamp of when the message was created, in UTC."},"choices":{"items":{"$ref":"#/components/schemas/CompletionStreamingChoice-Input"},"type":"array","title":"Choices","description":"List of events related to the streaming message."},"citations":{"items":{"type":"string"},"type":"array","title":"Citations","description":"List of citations related to the streaming message."},"search_results":{"items":{"$ref":"#/components/schemas/SearchResult"},"type":"array","title":"Search Results","description":"List of search results related to the streaming message."},"images":{"items":{"$ref":"#/components/schemas/ImageResult"},"type":"array","title":"Images","description":"List of images related to the streaming message."},"videos":{"items":{"$ref":"#/components/schemas/VideoResult"},"type":"array","title":"Videos","description":"List of videos related to the streaming message."}},"additionalProperties":false,"type":"object","required":["id","model"],"title":"CompletionStreamingEvent"},"CompletionStreamingEvent-Output":{"properties":{"id":{"type":"string","title":"Id","description":"Unique identifier for the message."},"object":{"type":"string","title":"Object","description":"Type of the current schema. Only 'chat.completion.chunk' is allowed.","default":"chat.completion.chunk"},"model":{"type":"string","title":"Model","description":"Alias of the LLM used in the chat session."},"created":{"type":"integer","title":"Created","description":"Timestamp of when the message was created, in UTC."},"choices":{"items":{"$ref":"#/components/schemas/CompletionStreamingChoice-Output"},"type":"array","title":"Choices","description":"List of events related to the streaming message."},"citations":{"items":{"type":"string"},"type":"array","title":"Citations","description":"List of citations related to the streaming message."},"search_results":{"items":{"$ref":"#/components/schemas/SearchResult"},"type":"array","title":"Search Results","description":"List of search results related to the streaming message."},"images":{"items":{"$ref":"#/components/schemas/ImageResult"},"type":"array","title":"Images","description":"List of images related to the streaming message."},"videos":{"items":{"$ref":"#/components/schemas/VideoResult"},"type":"array","title":"Videos","description":"List of videos related to the streaming message."}},"additionalProperties":false,"type":"object","required":["id","model"],"title":"CompletionStreamingEvent"},"CompletionUsageSchema":{"properties":{"prompt_tokens":{"type":"integer","title":"Prompt Tokens","description":"The number of tokens used in the prompt."},"completion_tokens":{"type":"integer","title":"Completion Tokens","description":"The number of tokens used in the response."},"total_tokens":{"type":"integer","title":"Total Tokens","description":"The total number of tokens used (prompt + response)."}},"additionalProperties":false,"type":"object","required":["prompt_tokens","completion_tokens","total_tokens"],"title":"CompletionUsageSchema"},"DocumentGroupCreate":{"properties":{"title":{"type":"string","title":"Title","description":"Title of the document group"},"description":{"type":"string","title":"Description","description":"Description of the document group"}},"additionalProperties":false,"type":"object","required":["title","description"],"title":"DocumentGroupCreate"},"DocumentGroupListSchema":{"properties":{"results":{"items":{"$ref":"#/components/schemas/DocumentGroupSchema"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"DocumentGroupListSchema"},"DocumentGroupPatch":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of the document group"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description of the document group"}},"additionalProperties":false,"type":"object","title":"DocumentGroupPatch"},"DocumentGroupSchema":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"knowledge_model_id":{"type":"string","title":"Knowledge Model Id"},"document_ids":{"items":{"type":"string"},"type":"array","title":"Document Ids"}},"additionalProperties":false,"type":"object","required":["id","title","description","knowledge_model_id","document_ids"],"title":"DocumentGroupSchema"},"DocumentPreprocessingConfig":{"properties":{"chunk_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Size","description":"Size of text chunks for document processing"},"chunk_overlap":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Chunk Overlap","description":"Overlap size between consecutive text chunks"},"enable_external_parser":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable External Parser","description":"Enable external parser for images extraction(llamaparser or gemini)"},"pdf_parsing_type":{"anyOf":[{"$ref":"#/components/schemas/PDFParsingType"},{"type":"null"}],"description":"Type of PDF parser to use"},"html_parsing_type":{"anyOf":[{"$ref":"#/components/schemas/HTMLParsingType"},{"type":"null"}],"description":"Type of HTML parser to use"},"enable_graph_filling":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enable Graph Filling","description":"Enable graph filling"}},"additionalProperties":false,"type":"object","title":"DocumentPreprocessingConfig"},"DocumentPreprocessingConfigSchema":{"properties":{"chunk_size":{"type":"integer","title":"Chunk Size","description":"Size of text chunks for document processing"},"chunk_overlap":{"type":"integer","title":"Chunk Overlap","description":"Overlap size between consecutive text chunks"},"pdf_parsing_type":{"$ref":"#/components/schemas/PDFParsingType","description":"Type of PDF parser to use"},"html_parsing_type":{"$ref":"#/components/schemas/HTMLParsingType","description":"Type of HTML parser to use"},"enable_external_parser":{"type":"boolean","title":"Enable External Parser","description":"Enable external parser for images extraction(llamaparser or gemini)"},"enable_graph_filling":{"type":"boolean","title":"Enable Graph Filling","description":"Enable graph filling"}},"additionalProperties":false,"type":"object","required":["chunk_size","chunk_overlap","pdf_parsing_type","html_parsing_type","enable_external_parser","enable_graph_filling"],"title":"DocumentPreprocessingConfigSchema"},"DocumentSchema":{"properties":{"id":{"type":"string","title":"Id"},"path":{"type":"string","title":"Path"},"name":{"type":"string","title":"Name"},"dirname":{"type":"string","title":"Dirname"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","path","name","dirname","created_at","updated_at"],"title":"DocumentSchema"},"DocumentType":{"type":"string","enum":["base","uploaded","system","conference","translation_dict","vimeo","youtube","attachment","webcrawler"],"title":"DocumentType"},"DocumentsAccessSchema":{"properties":{"webhook_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Url","description":"The URL for receiving a list of documents that are available for the user to access."}},"additionalProperties":false,"type":"object","required":["webhook_url"],"title":"DocumentsAccessSchema"},"EmbeddingsConfig":{"properties":{"emb_type":{"anyOf":[{"$ref":"#/components/schemas/EmbeddingsTypes"},{"type":"null"}],"description":"Type of embeddings to use"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Name of the embedding model to use"}},"additionalProperties":false,"type":"object","title":"EmbeddingsConfig"},"EmbeddingsConfigSchema":{"properties":{"emb_type":{"$ref":"#/components/schemas/EmbeddingsTypes","description":"Type of embeddings to use"},"model":{"type":"string","title":"Model","description":"Name of the embedding model to use"}},"additionalProperties":false,"type":"object","required":["emb_type","model"],"title":"EmbeddingsConfigSchema"},"EmbeddingsTypes":{"type":"string","enum":["openai","ollama"],"title":"EmbeddingsTypes"},"ErrorDetails":{"properties":{"msg":{"type":"string","title":"Msg"},"error_code":{"type":"integer","title":"Error Code"},"info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Info"}},"type":"object","required":["msg","error_code"],"title":"ErrorDetails"},"ErrorSchema":{"properties":{"detail":{"$ref":"#/components/schemas/ErrorDetails"}},"type":"object","required":["detail"],"title":"ErrorSchema"},"FileMetadataParameter":{"properties":{"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Tags","description":"New dictionary of tags that will substitute current"},"in_use":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Use","description":"Allow/disallow knowledge model to use the file in response"}},"additionalProperties":false,"type":"object","title":"FileMetadataParameter"},"HTMLParsingType":{"type":"string","enum":["simple","gemini"],"title":"HTMLParsingType"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HostedBy":{"properties":{"name":{"type":"string","title":"Name","description":"Name of language model hosting provider"}},"additionalProperties":false,"type":"object","required":["name"],"title":"HostedBy"},"HubSpotConfig":{"properties":{"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"API key"},"portal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portal Id","description":"Portal ID"},"email_template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Template Id","description":"Email template ID"},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id","description":"Campaign ID"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name","description":"Sender Name"},"sender_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Email","description":"Sender Email"}},"additionalProperties":false,"type":"object","title":"HubSpotConfig"},"HubSpotConfigSchema":{"properties":{"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"API key"},"portal_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portal Id","description":"Portal ID"},"email_template_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Template Id","description":"Email template ID"},"campaign_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Campaign Id","description":"Campaign ID"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name","description":"Sender Name"},"sender_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Email","description":"Sender Email"}},"additionalProperties":false,"type":"object","title":"HubSpotConfigSchema"},"IDMUserSchema":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id","description":"User unique identifier"},"tenant_id":{"type":"string","format":"uuid","title":"Tenant Id","description":"User tenant unique identifier"}},"additionalProperties":false,"type":"object","required":["user_id","tenant_id"],"title":"IDMUserSchema"},"ImageResult":{"properties":{"image_url":{"type":"string","title":"Image Url","description":"Image URL"},"origin_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Url","description":"Origin URL of the image"},"height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Height","description":"Height of the image"},"width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Width","description":"Width of the image"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title","description":"Title of the image"}},"type":"object","required":["image_url"],"title":"ImageResult"},"IndexStatusSchema":{"properties":{"status":{"$ref":"#/components/schemas/IndexingStatus"},"progress":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress"}},"additionalProperties":false,"type":"object","required":["status","progress"],"title":"IndexStatusSchema"},"IndexingStatus":{"type":"string","enum":["not_started","in_progress","error","done"],"title":"IndexingStatus"},"InternalChunkBatchCreate":{"properties":{"chunks":{"items":{"$ref":"#/components/schemas/InternalChunkCreate"},"type":"array","title":"Chunks","description":"List of chunks to create","examples":[{"content_source":"source1","content_type":"text","document_chunk_index":1,"embedding_key":"Some text for chunk 1 which will be used as embedding","priority":1,"text":"This is chunk 1"},{"content_source":"source2","content_type":"text","document_chunk_index":2,"embedding_key":"Some text for chunk 1 which will be used as embedding","priority":2,"text":"This is chunk 2"}]}},"additionalProperties":false,"type":"object","required":["chunks"],"title":"InternalChunkBatchCreate"},"InternalChunkCreate":{"properties":{"content_type":{"$ref":"#/components/schemas/ChunkContentType","description":"Content type of the chunk"},"content_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Source","description":"Source of the content"},"document_chunk_index":{"type":"integer","title":"Document Chunk Index","description":"Chunk index in the document part","default":-1},"text":{"type":"string","title":"Text","description":"Text content of the chunk"},"embedding_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Key","description":"Text content of the chunk which will be used for embedding"},"priority":{"type":"integer","title":"Priority","description":"Priority of the chunk","default":1}},"additionalProperties":false,"type":"object","required":["content_type","text"],"title":"InternalChunkCreate"},"InternalChunkPatch":{"properties":{"content_type":{"anyOf":[{"$ref":"#/components/schemas/ChunkContentType"},{"type":"null"}]},"content_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Source"},"document_chunk_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Document Chunk Index"},"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text"},"embedding_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Key"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"}},"additionalProperties":false,"type":"object","title":"InternalChunkPatch"},"InternalDocumentCreate":{"properties":{"name":{"type":"string","title":"Name","description":"Name of the internal document"},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Tags","description":"Tags for the internal document"},"priority":{"type":"integer","title":"Priority","description":"Priority of the internal document","default":1},"in_use":{"type":"boolean","title":"In Use","description":"Whether the internal document is in use","default":true}},"additionalProperties":false,"type":"object","required":["name"],"title":"InternalDocumentCreate"},"InternalDocumentListSchema":{"properties":{"results":{"items":{"$ref":"#/components/schemas/InternalDocumentSchema"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"InternalDocumentListSchema"},"InternalDocumentPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the internal document"},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Tags","description":"Tags for the internal document"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority","description":"Priority of the internal document"},"in_use":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Use","description":"Whether the internal document is in use"}},"additionalProperties":false,"type":"object","title":"InternalDocumentPatch"},"InternalDocumentSchema":{"properties":{"id":{"type":"string","title":"Id","description":"External ID of the internal document"},"name":{"type":"string","title":"Name","description":"Name of the internal document"},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Tags","description":"Tags for the internal document"},"priority":{"type":"integer","title":"Priority","description":"Priority of the internal document"},"in_use":{"type":"boolean","title":"In Use","description":"Whether the internal document is in use"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Creation timestamp"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Last update timestamp"}},"additionalProperties":false,"type":"object","required":["id","name","priority","in_use","created_at","updated_at"],"title":"InternalDocumentSchema"},"KMFileMetadataListSchema":{"properties":{"results":{"items":{"$ref":"#/components/schemas/KMFileMetadataSchema"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"KMFileMetadataListSchema"},"KMFileMetadataSchema":{"properties":{"id":{"type":"string","title":"Id"},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags"},"filename":{"type":"string","title":"Filename"},"in_use":{"type":"boolean","title":"In Use"},"indexing_status":{"$ref":"#/components/schemas/IndexingStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","filename","in_use","indexing_status","created_at"],"title":"KMFileMetadataSchema"},"KnowledgeModelAPIConfigSchema":{"properties":{"vector_db":{"$ref":"#/components/schemas/VectorDBConfigSchema","description":"Vector DB config"},"chat_model":{"$ref":"#/components/schemas/LLMModelConfigSchema","description":"Chat model config"},"indexer_model":{"$ref":"#/components/schemas/LLMModelConfigSchema","description":"Indexer model config"},"embedding":{"$ref":"#/components/schemas/EmbeddingsConfigSchema","description":"Embeddings config"},"document_preprocessing":{"$ref":"#/components/schemas/DocumentPreprocessingConfigSchema","description":"Document preprocessing config"},"session":{"$ref":"#/components/schemas/SessionConfigSchema","description":"Session config"},"hub_spot":{"$ref":"#/components/schemas/HubSpotConfigSchema","description":"HubSpot config"},"max_rag_concurrency":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Rag Concurrency","description":"Max RAG concurrency config"}},"additionalProperties":false,"type":"object","required":["vector_db","chat_model","indexer_model","embedding","document_preprocessing","session","hub_spot"],"title":"KnowledgeModelAPIConfigSchema"},"KnowledgeModelConfigurationPatch":{"properties":{"vector_db":{"anyOf":[{"$ref":"#/components/schemas/VectorDBConfig"},{"type":"null"}],"description":"Vector DB config"},"chat_model":{"anyOf":[{"$ref":"#/components/schemas/LLMModelConfig"},{"type":"null"}],"description":"Chat model config"},"indexer_model":{"anyOf":[{"$ref":"#/components/schemas/LLMModelConfig"},{"type":"null"}],"description":"Indexer model config"},"embedding":{"anyOf":[{"$ref":"#/components/schemas/EmbeddingsConfig"},{"type":"null"}],"description":"Embeddings config"},"document_preprocessing":{"anyOf":[{"$ref":"#/components/schemas/DocumentPreprocessingConfig"},{"type":"null"}],"description":"Document preprocessing config"},"session":{"anyOf":[{"$ref":"#/components/schemas/SessionConfig"},{"type":"null"}],"description":"Session config"},"hub_spot":{"anyOf":[{"$ref":"#/components/schemas/HubSpotConfig"},{"type":"null"}],"description":"HubSpot config"},"max_rag_concurrency":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Rag Concurrency","description":"Max RAG concurrency config"}},"additionalProperties":false,"type":"object","title":"KnowledgeModelConfigurationPatch"},"KnowledgeModelCreate":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name","description":"Name of the knowledge model.","examples":["Materials knowledge model","Lectures about AI assistants from Constructor University","History of Bulgaria"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Optional description of the knowledge model.","examples":["This model allows you to chat about materials science research field.","Set of lectures transcript from AI assistant developing course from Constructor University.","The set of books about Bulgarian history from stone age till now."]},"shared_type":{"$ref":"#/components/schemas/SharedType","description":"Sharing type for the knowledge model:\n- 'all': Every user may chat with the knowledge model.\n- 'tenant': Only users from the owner's tenant can chat with the model.\n- 'private': Only the owner can chat with the model.","default":"private"},"share_documents":{"type":"boolean","title":"Share Documents","description":"Flag to allow sharing documents with knowledge model depends on shared type","default":false}},"additionalProperties":false,"type":"object","required":["name"],"title":"KnowledgeModelCreate"},"KnowledgeModelDocumentsAccessPatch":{"properties":{"webhook_url":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Webhook URL for documents access","description":"The URL for receiving a list of documents that are available for the user to access.","examples":["https://example.com/webhook-endpoint","https://api.supermaven.io/delivery/hooks/12345","https://university.edu/api/intake/notifications","https://supportportal.com/ticketing/hooks"]}},"additionalProperties":false,"type":"object","title":"KnowledgeModelDocumentsAccessPatch"},"KnowledgeModelListSchema":{"properties":{"results":{"items":{"$ref":"#/components/schemas/KnowledgeModelSchema"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"KnowledgeModelListSchema"},"KnowledgeModelPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Name","description":"Name of knowledge model","examples":["Materials knowledge model","Lectures about AI assistants from Constructor University","History of Bulgaria"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Knowledge model description","examples":["This model allows you to chat about materials science research field.","Set of lectures transcript from AI assistant developing course from Constructor University.","The set of books about bulgarian history from stone age till now."]},"shared_type":{"anyOf":[{"$ref":"#/components/schemas/SharedType"},{"type":"null"}],"description":"Set knowledge model sharing type,\n* 'all' - every user may chat with knowledge model\n* 'tenant' - only users from owner tenant can chat with model\n* 'private' - only owner can chat with model"},"share_documents":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Share Documents","description":"Flag to allow sharing documents with knowledge model depends on shared type"}},"additionalProperties":false,"type":"object","title":"KnowledgeModelPatch"},"KnowledgeModelSchema":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"owner":{"$ref":"#/components/schemas/IDMUserSchema"},"shared_type":{"$ref":"#/components/schemas/SharedType"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"share_documents":{"type":"boolean","title":"Share Documents"}},"additionalProperties":false,"type":"object","required":["id","name","description","owner","shared_type","created_at","share_documents"],"title":"KnowledgeModelSchema"},"KnowledgeModelSettingsPatch":{"properties":{"system_message":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeModelSystemMessagePatch"},{"type":"null"}],"description":"System messages for defining model personality and behaviour"},"documents_access":{"anyOf":[{"$ref":"#/components/schemas/KnowledgeModelDocumentsAccessPatch"},{"type":"null"}],"description":"Specifies document access settings for the knowledge model"}},"additionalProperties":false,"type":"object","title":"KnowledgeModelSettingsPatch"},"KnowledgeModelSettingsSchema":{"properties":{"system_message":{"$ref":"#/components/schemas/SystemMessageSchema","description":"Settings for model personality and responses"},"documents_access":{"$ref":"#/components/schemas/DocumentsAccessSchema","description":"Specifies document access settings for the knowledge model"}},"additionalProperties":false,"type":"object","required":["system_message","documents_access"],"title":"KnowledgeModelSettingsSchema"},"KnowledgeModelSystemMessagePatch":{"properties":{"personality":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model personality","description":"System message that defines the model's personality and behavior.","examples":["You are an assistant for question-answering tasks.","You are an AI assistant specializing in university policies and regulations.","You are an AI assistant for providing guidance within a set of educational courses.","You are an IT support agent who retrieves troubleshooting steps from a repository of known issues and best practices."]},"responses":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model responses","description":"System message that defines how model should respond","examples":["Be concise! You can give additional note or explanation about the problem and the solution you give if necessary, but keep it short. Be sure to answer the question directly instead of only giving explanatory notes!","Answer questions concisely and professionally, providing specific policy references when applicable. If a question is unclear or outside your scope, ask for clarification or direct the student to the appropriate university department.","When answering questions, provide concise explanations followed by a direct link to the relevant section in the course material.","Responses should be short, around 150 words, with step-by-step instructions on resolving technical problems."]}},"additionalProperties":false,"type":"object","title":"KnowledgeModelSystemMessagePatch"},"KnowledgeModelVideoDocumentPatch":{"properties":{"in_use":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"In Use","description":"Whether the video document should be used in the knowledge model","examples":[true,false]}},"additionalProperties":false,"type":"object","title":"KnowledgeModelVideoDocumentPatch"},"KnowledgeModelVideoListSchema":{"properties":{"results":{"items":{"$ref":"#/components/schemas/KnowledgeModelVideoSchema"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"KnowledgeModelVideoListSchema"},"KnowledgeModelVideoSchema":{"properties":{"id":{"type":"string","title":"Id"},"knowledge_model_id":{"type":"string","title":"Knowledge Model Id"},"name":{"type":"string","title":"Name"},"in_use":{"type":"boolean","title":"In Use"},"indexing":{"$ref":"#/components/schemas/IndexStatusSchema"},"link":{"type":"string","title":"Link"},"thumbnail":{"type":"string","title":"Thumbnail"},"duration":{"type":"integer","title":"Duration"},"type":{"$ref":"#/components/schemas/DocumentType"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["id","knowledge_model_id","name","in_use","indexing","link","thumbnail","duration","type","created_at","updated_at"],"title":"KnowledgeModelVideoSchema"},"LLMListResponseMode":{"type":"string","enum":["default","openai"],"title":"LLMListResponseMode"},"LLMModelConfig":{"properties":{"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature","description":"Temperature for language model generation"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Name of the language model to use","examples":["claude-3-5-sonnet-20240620","claude-3-haiku-20240307","claude-3-opus-20240229","deepseek/deepseek-chat","deepseek/deepseek-r1","deepseek-r1:14b","gemini-1.0-pro","gemini-1.5-flash","gemini-1.5-pro","gpt-3.5-turbo","gpt-4","gpt-4o-2024-08-06","gpt-4o-mini","gpt-4-turbo","llama3.1:8b-instruct-q4_K_M","llama3.2:3b","llama3.2-vision:11b-instruct-q4_K_M","o1-mini","o1-preview"]}},"additionalProperties":false,"type":"object","title":"LLMModelConfig"},"LLMModelConfigSchema":{"properties":{"temperature":{"type":"number","title":"Temperature","description":"Temperature for language model generation"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model","description":"Name of the language model to use","examples":["claude-3-5-sonnet-20240620","claude-3-haiku-20240307","claude-3-opus-20240229","deepseek/deepseek-chat","deepseek/deepseek-r1","deepseek-r1:14b","gemini-1.0-pro","gemini-1.5-flash","gemini-1.5-pro","gpt-3.5-turbo","gpt-4","gpt-4o-2024-08-06","gpt-4o-mini","gpt-4-turbo","llama3.1:8b-instruct-q4_K_M","llama3.2:3b","llama3.2-vision:11b-instruct-q4_K_M","o1-mini","o1-preview"]}},"additionalProperties":false,"type":"object","required":["temperature"],"title":"LLMModelConfigSchema"},"LicensedFeaturesListResponseSchema":{"properties":{"results":{"items":{"type":"string"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"LicensedFeaturesListResponseSchema"},"LikeStatus":{"type":"string","enum":["like","dislike","none"],"title":"LikeStatus"},"LlmListSchema-Input":{"properties":{"results":{"items":{"$ref":"#/components/schemas/LlmSchema"},"type":"array","title":"Results","description":"List of all available language models"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"LlmListSchema"},"LlmListSchema-Output":{"properties":{"results":{"items":{"$ref":"#/components/schemas/LlmSchema"},"type":"array","title":"Results","description":"List of all available language models"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"LlmListSchema"},"LlmMetadataOpenAI":{"properties":{"name":{"type":"string","title":"Name","description":"Name of language model"},"description":{"type":"string","title":"Description","description":"Description of language model"},"original_id":{"type":"string","title":"Original Id","description":"Original identifier of language model"},"code":{"type":"string","title":"Code","description":"Language model code"}},"additionalProperties":false,"type":"object","required":["name","description","original_id","code"],"title":"LlmMetadataOpenAI"},"LlmOpenAIListSchema-Input":{"properties":{"object":{"type":"string","title":"Object","description":"Object type, always 'list'","default":"list"},"data":{"items":{"$ref":"#/components/schemas/LlmSchemaOpenAI"},"type":"array","title":"Data","description":"List of OpenAI language models"}},"additionalProperties":false,"type":"object","required":["data"],"title":"LlmOpenAIListSchema"},"LlmOpenAIListSchema-Output":{"properties":{"object":{"type":"string","title":"Object","description":"Object type, always 'list'","default":"list"},"data":{"items":{"$ref":"#/components/schemas/LlmSchemaOpenAI"},"type":"array","title":"Data","description":"List of OpenAI language models"}},"additionalProperties":false,"type":"object","required":["data"],"title":"LlmOpenAIListSchema"},"LlmSchema":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of language model"},"name":{"type":"string","title":"Name","description":"Name of language model"},"description":{"type":"string","title":"Description","description":"Description of language model"},"alias":{"type":"string","title":"Alias","description":"Alias of language model"},"hosted_by":{"anyOf":[{"$ref":"#/components/schemas/HostedBy"},{"type":"null"}],"description":"Language model hosting provider"},"code":{"type":"string","title":"Code","description":"Language model code"},"icon":{"type":"string","title":"Icon","description":"Language model icon"}},"additionalProperties":false,"type":"object","required":["id","name","description","alias","code","icon"],"title":"LlmSchema"},"LlmSchemaOpenAI":{"properties":{"id":{"type":"string","title":"Id","description":"Identifier of language model"},"object":{"type":"string","title":"Object","description":"Object type, always 'model'","default":"model"},"created":{"type":"integer","title":"Created","description":"Creation timestamp of language model","default":320022000},"owned_by":{"type":"string","title":"Owned By","description":"Owner of the language model"},"permission":{"items":{"type":"string"},"type":"array","title":"Permission","description":"Permissions associated with the language model"},"root":{"type":"string","title":"Root","description":"Root identifier of the language model"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent","description":"Parent identifier of the language model"},"metadata":{"$ref":"#/components/schemas/LlmMetadataOpenAI","description":"Metadata of the language model"}},"additionalProperties":false,"type":"object","required":["id","owned_by","root","metadata"],"title":"LlmSchemaOpenAI"},"MessageDocument-Input":{"properties":{"id":{"type":"string","title":"Id"},"summary":{"type":"string","title":"Summary"},"filename":{"type":"string","title":"Filename"},"chunks":{"items":{"anyOf":[{"$ref":"#/components/schemas/MessageDocumentChunkText"},{"$ref":"#/components/schemas/MessageDocumentChunkImage"},{"$ref":"#/components/schemas/MessageDocumentChunkTable"},{"$ref":"#/components/schemas/MessageDocumentChunkTranscript"}]},"type":"array","title":"Chunks"},"deleted":{"type":"boolean","title":"Deleted","default":false},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags"}},"additionalProperties":false,"type":"object","required":["id","summary","filename","chunks"],"title":"MessageDocument"},"MessageDocument-Output":{"properties":{"id":{"type":"string","title":"Id"},"summary":{"type":"string","title":"Summary"},"filename":{"type":"string","title":"Filename"},"chunks":{"items":{"anyOf":[{"$ref":"#/components/schemas/MessageDocumentChunkText"},{"$ref":"#/components/schemas/MessageDocumentChunkImage"},{"$ref":"#/components/schemas/MessageDocumentChunkTable"},{"$ref":"#/components/schemas/MessageDocumentChunkTranscript"}]},"type":"array","title":"Chunks"},"deleted":{"type":"boolean","title":"Deleted","default":false},"tags":{"additionalProperties":{"type":"string"},"type":"object","title":"Tags"}},"additionalProperties":false,"type":"object","required":["id","summary","filename","chunks"],"title":"MessageDocument"},"MessageDocumentChunkImage":{"properties":{"id":{"type":"string","title":"Id"},"type":{"$ref":"#/components/schemas/ChunkContentType","default":"image"},"src":{"type":"string","title":"Src"}},"additionalProperties":false,"type":"object","required":["id","src"],"title":"MessageDocumentChunkImage"},"MessageDocumentChunkTable":{"properties":{"id":{"type":"string","title":"Id"},"type":{"$ref":"#/components/schemas/ChunkContentType","default":"table"},"src":{"type":"string","title":"Src"}},"additionalProperties":false,"type":"object","required":["id","src"],"title":"MessageDocumentChunkTable"},"MessageDocumentChunkText":{"properties":{"id":{"type":"string","title":"Id"},"type":{"$ref":"#/components/schemas/ChunkContentType","default":"text"},"text":{"type":"string","title":"Text"},"highlights":{"items":{"$ref":"#/components/schemas/MessageDocumentHighlight"},"type":"array","title":"Highlights"}},"additionalProperties":false,"type":"object","required":["id","text","highlights"],"title":"MessageDocumentChunkText"},"MessageDocumentChunkTranscript":{"properties":{"id":{"type":"string","title":"Id"},"type":{"$ref":"#/components/schemas/ChunkContentType","default":"transcript"},"text":{"type":"string","title":"Text"},"start_second":{"type":"number","title":"Start Second"},"highlights":{"items":{"$ref":"#/components/schemas/MessageDocumentHighlight"},"type":"array","title":"Highlights"}},"additionalProperties":false,"type":"object","required":["id","text","start_second","highlights"],"title":"MessageDocumentChunkTranscript"},"MessageDocumentHighlight":{"properties":{"start":{"type":"integer","title":"Start"},"length":{"type":"integer","title":"Length"}},"additionalProperties":false,"type":"object","required":["start","length"],"title":"MessageDocumentHighlight"},"MessageFeedback":{"properties":{"like_status":{"anyOf":[{"$ref":"#/components/schemas/LikeStatus"},{"type":"null"}],"description":"Set feedback status on bot message","examples":["like","dislike","none"]},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback","description":"Send feedback message on bot message","examples":["This message is confusing","Bot responded without any document references"]}},"additionalProperties":false,"type":"object","title":"MessageFeedback"},"MessageLink":{"properties":{"id":{"type":"string","title":"Id","description":"Message URL identifier"},"url":{"type":"string","title":"Url","description":"Message URL value"},"title":{"type":"string","title":"Title","description":"Title of page for this URL"}},"additionalProperties":false,"type":"object","required":["id","url","title"],"title":"MessageLink"},"MessageReference":{"properties":{"id":{"type":"string","title":"Id"},"document_id":{"type":"string","title":"Document Id"},"chunk_ids":{"items":{"type":"string"},"type":"array","title":"Chunk Ids"},"position":{"type":"integer","title":"Position"}},"additionalProperties":false,"type":"object","required":["id","document_id","chunk_ids","position"],"title":"MessageReference"},"MessageStatus":{"type":"string","enum":["streaming","done","aborted","processing"],"title":"MessageStatus"},"PDFParsingType":{"type":"string","enum":["simple","llama","gemini"],"title":"PDFParsingType"},"ReindexConfiguration":{"properties":{"documents_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Documents Ids","description":"Document IDs to which reindexing will be applied"},"failed_documents":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Failed Documents","description":"Reindexing will be applied to all failed documents"}},"additionalProperties":false,"type":"object","title":"ReindexConfiguration"},"SchemaTypes":{"type":"string","enum":["text","json_schema"],"title":"SchemaTypes"},"SearchResult":{"properties":{"title":{"type":"string","title":"Title","description":"Title of the search result"},"url":{"type":"string","title":"Url","description":"URL of the search result"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date","description":"Date of the search result"},"last_updated":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Updated","description":"Last updated date of the search result"},"snippet":{"type":"string","title":"Snippet","description":"Snippet of the search result","default":""},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Source of the search result"}},"type":"object","required":["title","url"],"title":"SearchResult"},"SessionConfig":{"properties":{"default_extension":{"anyOf":[{"$ref":"#/components/schemas/ChatExtension"},{"type":"null"}],"description":"Default file extension for session handling. Available extensions:\n        - explorer: Interactive file navigation and exploration\n        - re_act_km_chat: Reasoning and acting capabilities within knowledge model chat\n        - conference_assistant: Specialized assistant for conference and meeting management\n        - food_safety_assistant: Domain-specific assistant for food safety compliance\n        - digital_twin: Virtual representation and simulation assistant\n        - direct_llm: Direct language model interaction without RAG\n        - compliance_assistant: Regulatory compliance and audit assistance\n        - pandasai: Data analysis and manipulation using pandas framework\n        - career_adviser: Professional development and career guidance\n        - avatar: AI-powered avatar interaction","examples":["explorer","re_act_km_chat","conference_assistant","food_safety_assistant","digital_twin","direct_llm","compliance_assistant","pandasai","career_adviser","avatar"]}},"additionalProperties":false,"type":"object","title":"SessionConfig"},"SessionConfigSchema":{"properties":{"default_extension":{"anyOf":[{"$ref":"#/components/schemas/ChatExtension"},{"type":"null"}],"description":"Default file extension for session handling. Available extensions:\n        - explorer: Interactive file navigation and exploration\n        - re_act_km_chat: Reasoning and acting capabilities within knowledge model chat\n        - conference_assistant: Specialized assistant for conference and meeting management\n        - food_safety_assistant: Domain-specific assistant for food safety compliance\n        - digital_twin: Virtual representation and simulation assistant\n        - direct_llm: Direct language model interaction without RAG\n        - compliance_assistant: Regulatory compliance and audit assistance\n        - pandasai: Data analysis and manipulation using pandas framework\n        - career_adviser: Professional development and career guidance\n        - avatar: AI-powered avatar interaction","examples":["explorer","conference_assistant","food_safety_assistant","digital_twin","direct_llm","compliance_assistant","pandasai","career_adviser","avatar","re_act_km_chat"]}},"additionalProperties":false,"type":"object","title":"SessionConfigSchema"},"SessionOrigin":{"type":"string","enum":["UI","API","STATELESS_API","WIDGET","INDEXING"],"title":"SessionOrigin"},"SharedType":{"type":"string","enum":["all","tenant","private"],"title":"SharedType"},"SortingOptions":{"type":"string","enum":["chunk_index","document_id"],"title":"SortingOptions"},"StopReason":{"type":"string","enum":["stop","length","tool_calls","invalid_json_schema"],"title":"StopReason"},"StructuredOutputJsonSchemaBase":{"properties":{"type":{"$ref":"#/components/schemas/SchemaTypes","default":"text"},"json_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Json Schema"}},"type":"object","required":["json_schema"],"title":"StructuredOutputJsonSchemaBase","description":"Base keys which must be assigned"},"SystemMessageSchema":{"properties":{"personality":{"type":"string","title":"Personality","description":"System message that defines the model's personality and behavior."},"responses":{"type":"string","title":"Responses","description":"System message that defines how model should respond"}},"additionalProperties":false,"type":"object","required":["personality","responses"],"title":"SystemMessageSchema"},"TranscriptionEntry":{"properties":{"text":{"type":"string","title":"Text"},"timestamp":{"type":"number","title":"Timestamp"}},"additionalProperties":false,"type":"object","required":["text","timestamp"],"title":"TranscriptionEntry"},"TranscriptionResponseSchema":{"properties":{"video_id":{"type":"string","title":"Video Id"},"status":{"type":"string","title":"Status"},"data":{"items":{"$ref":"#/components/schemas/TranscriptionEntry"},"type":"array","title":"Data"}},"additionalProperties":false,"type":"object","required":["video_id","status","data"],"title":"TranscriptionResponseSchema"},"TranslationRequest":{"properties":{"source_texts":{"items":{"type":"string"},"type":"array","title":"Source Texts","description":"List of English texts."},"target_language":{"type":"string","title":"Target Language","description":"The language into which the texts need to be translated."}},"additionalProperties":false,"type":"object","required":["source_texts","target_language"],"title":"TranslationRequest"},"TranslationResponseSchema":{"properties":{"translations":{"items":{"type":"string"},"type":"array","title":"Translations","description":"The translated phrases"}},"additionalProperties":false,"type":"object","required":["translations"],"title":"TranslationResponseSchema"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VectorDBConfig":{"properties":{"top_k":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Top K","description":"Number of top results to retrieve from vector database"}},"additionalProperties":false,"type":"object","title":"VectorDBConfig"},"VectorDBConfigSchema":{"properties":{"top_k":{"type":"integer","title":"Top K","description":"Number of top results to retrieve from vector database"}},"additionalProperties":false,"type":"object","required":["top_k"],"title":"VectorDBConfigSchema"},"VideoImportRequest":{"properties":{"link":{"type":"string","title":"Link","description":"URL link to the video or video ID","examples":["https://vimeo.com/123456789","123456789"]},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language","description":"Language code for the video transcription","default":"en","examples":["en","fr","es","de"]},"type":{"anyOf":[{"type":"string","enum":["vimeo","youtube"]},{"type":"null"}],"title":"Type"}},"type":"object","required":["link"],"title":"VideoImportRequest"},"VideoResult":{"properties":{"url":{"type":"string","title":"Url","description":"Video URL"},"thumbnail_width":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Thumbnail Width","description":"Thumbnail width of the video"},"thumbnail_height":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Thumbnail Height","description":"Thumbnail height of the video"},"thumbnail_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thumbnail Url","description":"Thumbnail URL of the video"}},"type":"object","required":["url"],"title":"VideoResult"},"WidgetPatch":{"properties":{"session_rpm":{"anyOf":[{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Session Rpm","description":"The count of sessions per minute for all widgets of the knowledge model"},"message_rpm":{"anyOf":[{"type":"integer","maximum":10.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Message Rpm","description":"The count of messages per minute for all widgets of the knowledge model"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled","description":"This field indicated can user access shared model via widget or not."},"llm_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Id","description":"Default language model identifier to use in knowledge model widget"}},"additionalProperties":false,"type":"object","title":"WidgetPatch"},"WidgetSchema":{"properties":{"session_rpm":{"type":"integer","maximum":100.0,"exclusiveMinimum":0.0,"title":"Session Rpm","description":"The count of sessions per minute for all widgets of the knowledge model","default":5},"message_rpm":{"type":"integer","maximum":10.0,"exclusiveMinimum":0.0,"title":"Message Rpm","description":"The count of messages per minute for all widgets of the knowledge model","default":3},"enabled":{"type":"boolean","title":"Enabled","description":"This field indicated can user access shared model via widget or not.","default":false},"llm_id":{"type":"string","title":"Llm Id","description":"Default language model identifier to use in knowledge model widget"}},"additionalProperties":false,"type":"object","required":["llm_id"],"title":"WidgetSchema"},"app__api__responses__chunk__ChunkListSchema":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ChunkSchema"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"ChunkListSchema"},"app__api__responses_kmapi__chunk__ChunkListSchema":{"properties":{"results":{"items":{"$ref":"#/components/schemas/ChunkResult"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total","description":"Total count of available records. It can be larger than results count."}},"additionalProperties":false,"type":"object","required":["results","total"],"title":"ChunkListSchema"}}}}