Represents a message within an Explanation or a Knowledge Base Chat.
For Explanations - An assistant message is either an initial Explanation for the document when no messages were provided in the request or an answer to a user message in the provided conversation history.
Show child attributes
Example:
{
"role": "assistant",
"content": "Hi!\nThe co-founders of Totoy are Benedikt Hielscher, Francis Rafal, Marcel Koller, Michael Perger and Simon Hoffmann.[R1]"
}
The unique identifier of the Knowledge Base that was used for the Chat.
Maximum string length: 28
Pattern: ^kb_[a-zA-Z0-9]{25}$
Example:
"kb_feMfJbeqbAEj4u8K5HqmKpUbY"
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Totoy Logo","colors":{"primary":"#6C59F7","light":"#6C59F7","dark":"#6C59F7"},"favicon":"https://mintcdn.com/totoygmbh/VcohGNXAGccdCEWG/logo/Totoy%20App%20Icon-09.png?fit=max\u0026auto=format\u0026n=VcohGNXAGccdCEWG\u0026q=85\u0026s=343ef2a90ae1cf5489c460cca2414d27","logo":{"light":"https://mintcdn.com/totoygmbh/VcohGNXAGccdCEWG/logo/Full%20Logo%20Dark%20Font.svg?fit=max\u0026auto=format\u0026n=VcohGNXAGccdCEWG\u0026q=85\u0026s=7305a4b5c2a2ee7fbb383369e681b50c","dark":"https://mintcdn.com/totoygmbh/VcohGNXAGccdCEWG/logo/Full%20Logo%20Light%20Font.svg?fit=max\u0026auto=format\u0026n=VcohGNXAGccdCEWG\u0026q=85\u0026s=1290bc62296a4724161511999743e4ce"},"navbar":{"links":[{"label":"Support","href":"mailto:hello@totoy.ai"}],"primary":null},"footer":{"socials":{"instagram":"https://www.instagram.com/totoyapp?igsh=MWVyM3lhaTBsOTlvdQ==","github":"https://github.com/totoy-ai","linkedin":"https://linkedin.com/company/totoyapp"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"totoygmbh","hasAudioNarration":false,"actualSubdomain":"totoygmbh","customDomains":["docs.totoy.ai"],"gitSource":{"type":"github","owner":"totoy-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21a6a524ecb5ea3410d010","collectionId":"304b9db5-e1b9-4a03-a9c1-b7a8272a655e","schemaVersion":"v2"},"entitlements":{},"buildId":"6a21a6a524ecb5ea3410d010:success","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"API Reference","count":23},{"language":"default","tag":"Knowledge Bases","count":10},{"language":"default","tag":"Sources","count":6},{"language":"default","tag":"Projects","count":5},{"language":"default","tag":"Explanation","count":1},{"language":"default","tag":"Organization","count":1}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages","slug":"/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages","pageMetadata":{"title":"Creates a Knowledge Base Chat Response for the given Messages.","description":null,"deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /knowledge-bases/{knowledge_base_id}/chat","href":"/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages","autogeneratedByOpenApi":true},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Creates a Knowledge Base Chat Response for the given Messages.","description":null,"deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /knowledge-bases/{knowledge_base_id}/chat","href":"/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"chatWithKnowledgeBase","tags":["Knowledge Bases"],"x-speakeasy-group":"KnowledgeBases","summary":"Creates a Knowledge Base Chat Response for the given Messages.","parameters":["77304e9f-a9d5-4f68-8417-cc5da576a5fe"],"requestBody":"8974313c-0d2c-48e4-ba58-665ea35d5f26","responses":{"200":"6f71b639-b2c2-461c-aeeb-bd581a439fca","4XX":"67ac1335-7c5c-474f-a7d3-55efb2406a60","5XX":"87c9dd6e-1c1f-419a-9e23-91c33781475b"},"method":"post","type":"path","servers":["5b2812cd-a513-4390-94ec-f12c067b1621"],"security":["6187ac53-fd74-459c-85cb-43152350deb9"],"path":"/knowledge-bases/{knowledge_base_id}/chat","baseUrlOptions":["https://api.totoy.ai/v1"],"title":"Creates a Knowledge Base Chat Response for the given Messages.","description":"","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"77304e9f-a9d5-4f68-8417-cc5da576a5fe":{"name":"knowledge_base_id","in":"path","required":true,"schema":{"type":"string","maxLength":28,"pattern":"^kb_[a-zA-Z0-9]{25}$","isRequired":true,"description":"Unique identifier for a `Knowledge Base`.","uniqueKey":"","typeLabel":"string"},"description":"Unique identifier for a `Knowledge Base`.","examples":{"knowledge-base-id-example":{"summary":"Knowledge Base ID Example","description":"An example for a `knowledge_base_id`.","value":"kb_feMfJbeqbAEj4u8K5HqmKpUbY"}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"KnowledgeBaseChatRequest","type":"object","additionalProperties":false,"properties":{"output_language":{"title":"OutputLanguage","description":"The ISO 639-1 code for the language in which the `Explanation` should be generated.\nSupported Languages:\n- ar: Arabic\n- bs: Bosnian\n- cs: Czech\n- de: German\n- es: Spanish\n- en: English\n- fa: Farsi\n- fr: French\n- hr: Croatian\n- hu: Hungarian\n- it: Italian\n- pl: Polish\n- ro: Romanian\n- sk: Slovak\n- sl: Slovenian\n- sr: Serbian\n- tl: Tagalog\n- tr: Turkish\n- uk: Ukrainian\n- zh: Mandarin\n","type":"string","enum":["ar","bs","cs","de","es","en","fa","fr","hr","hu","it","pl","ro","sk","sl","sr","tl","tr","uk","zh"],"example":"en","isRequired":true,"uniqueKey":"output_language","typeLabel":"enum\u003cstring>"},"language_level":{"title":"LanguageLevel","description":"One of three language levels for the generated text:\n1. Simple Language: Answers are short and simple, using easy words and a clear structure.\n2. Plain Language: Answers are short and the assistant explains complicated terms.\n3. Detailed Language: Answers are not simplified and the assistant answers in detail.\n","type":"string","enum":["simple","plain","detailed"],"example":"plain","isRequired":true,"uniqueKey":"language_level","typeLabel":"enum\u003cstring>"},"messages":{"description":"The conversation history. Provide at least one user message to start the conversation.","type":"array","items":{"title":"Message","description":"Represents a message within an `Explanation` or a `Knowledge Base Chat`.\nFor `Explanations` - An `assistant` message is either an initial `Explanation` for the document when no messages were provided in the request or an answer to a user message in the provided conversation history.\n","type":"object","additionalProperties":false,"properties":{"role":{"description":"The entity that produced the message. One of `user` or `assistant`.","type":"string","enum":["user","assistant"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"description":"The content of the message. The maximum length is 16,000 characters.","type":"string","maxLength":16000,"isRequired":true,"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string"},"references":{"type":"array","items":{"title":"Reference","description":"Represents a reference to a `Source` that was used to generate the answer.\nThe reference is used to provide backlinks to the original source and to provide context for the generated answer.\n","type":"object","additionalProperties":false,"properties":{"text":{"description":"String in the message content that needs to be replaced.","type":"string","maxLength":8,"example":"[R1]","isRequired":true,"uniqueKey":"messages.items.[INDEX].references.items.[INDEX].text","typeLabel":"string"},"source_id":{"description":"What `Source` the generated answer depended on.","maxLength":29,"pattern":"^src_[a-zA-Z0-9]{25}$","type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].references.items.[INDEX].source_id","typeLabel":"string"},"page_number":{"oneOf":[{"description":"The page number in the `Source` the generated answer depended on. Only applicable for documents.","type":"integer","format":"int32","example":5,"minimum":1,"maximum":1000,"uniqueKey":"messages.items.[INDEX].references.items.[INDEX].page_number.oneOf.0","typeLabel":"integer\u003cint32>"},{"description":"The page number in the `Source` the generated answer depended on. Only applicable for documents.","type":"null","format":"int32","example":5,"minimum":1,"maximum":1000,"uniqueKey":"messages.items.[INDEX].references.items.[INDEX].page_number.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].references.items.[INDEX].page_number","typeLabel":"integer\u003cint32> | null"},"backlink":{"description":"The backlink of the `Source`, so it can be called from the client.","type":"string","maxLength":512,"example":"https://www.example.com/text.pdf","uniqueKey":"messages.items.[INDEX].references.items.[INDEX].backlink","typeLabel":"string"},"custom_metadata":{"title":"CustomMetadata","description":"Custom optional metadata for a `Source` provided by a client. Up to 10 key-value pairs.","type":"object","additionalProperties":true,"maxProperties":10,"example":{"internal_tag":"general_documents"},"uniqueKey":"messages.items.[INDEX].references.items.[INDEX].custom_metadata","typeLabel":"CustomMetadata · object"}},"required":["text","source_id"],"example":{"text":"[R1]","source_id":"src_oXiYDg8QOc9JsOk86idRXiywD","page_number":5,"backlink":"https://www.totoy.ai/totoy-company-overview.pdf","custom_metadata":{"internal_tag":"general_documents"}},"uniqueKey":"messages.items.[INDEX].references.items.[INDEX]","typeLabel":"Reference · object"},"maxItems":50,"uniqueKey":"messages.items.[INDEX].references","typeLabel":"Reference · object[]"}},"required":["role","content"],"example":{"role":"assistant","content":"Hi!\nThe co-founders of Totoy are Benedikt Hielscher, Francis Rafal, Marcel Koller, Michael Perger and Simon Hoffmann.[R1]"},"uniqueKey":"messages.items.[INDEX]","typeLabel":"Message · object"},"maxItems":50,"isRequired":true,"uniqueKey":"messages","typeLabel":"Message · object[]"},"markdown_response":{"description":"Whether the response should be returned as Markdown formatted text. If 'false', the response will be returned in plain text.","type":"boolean","default":true,"example":true,"uniqueKey":"markdown_response","typeLabel":"boolean"}},"required":["output_language","language_level","messages"],"uniqueKey":"","typeLabel":"KnowledgeBaseChatRequest · object"},"examples":{"knowledge-base-chat-request-example-1":{"title":"knowledge-base-chat-request-example-1","description":"An example for requesting a plain English answer to a question to a `Knowledge Base`.","value":{"output_language":"en","language_level":"plain","markdown_response":true,"messages":[{"role":"user","content":"Who are the co-founders of Totoy?"}]}},"knowledge-base-chat-request-example-2":{"title":"knowledge-base-chat-request-example-2","description":"An example for requesting a plain English answer to a follow-up question to a `Knowledge Base`, based on the response to a previous question.","value":{"output_language":"en","language_level":"plain","messages":[{"role":"user","content":"Who are the co-founders of Totoy?"},{"role":"assistant","content":"Hi!\nThe co-founders of Totoy are Benedikt Hielscher, Francis Rafal, Marcel Koller, Michael Perger and Simon Hoffmann.[R1]","references":[{"text":"[R1]","source_id":"src_oXiYDg8QOc9JsOk86idRXiywD","page_number":5,"backlink":"https://www.totoy.ai/totoy-company-overview.pdf","custom_metadata":{"internal_tag":"general_documents"}}]},{"role":"user","content":"What are they trying to achieve?"}],"markdown_response":true}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"6f71b639-b2c2-461c-aeeb-bd581a439fca":{"description":"OK","content":{"application/json":{"schema":{"title":"KnowledgeBaseChatResponse","type":"object","additionalProperties":false,"properties":{"project_id":{"description":"The `Project` that the `Knowledge Base` is assigned to.","maxLength":28,"pattern":"^pj_[a-zA-Z0-9]{25}$","type":"string","example":"pj_avX7imfLaPcQnv5ckvGlOEBA9","isRequired":true,"uniqueKey":"project_id","typeLabel":"string"},"output_language":{"title":"OutputLanguage","description":"The ISO 639-1 code for the language in which the `Explanation` should be generated.\nSupported Languages:\n- ar: Arabic\n- bs: Bosnian\n- cs: Czech\n- de: German\n- es: Spanish\n- en: English\n- fa: Farsi\n- fr: French\n- hr: Croatian\n- hu: Hungarian\n- it: Italian\n- pl: Polish\n- ro: Romanian\n- sk: Slovak\n- sl: Slovenian\n- sr: Serbian\n- tl: Tagalog\n- tr: Turkish\n- uk: Ukrainian\n- zh: Mandarin\n","type":"string","enum":["ar","bs","cs","de","es","en","fa","fr","hr","hu","it","pl","ro","sk","sl","sr","tl","tr","uk","zh"],"example":"en","isRequired":true,"uniqueKey":"output_language","typeLabel":"enum\u003cstring>"},"language_level":{"title":"LanguageLevel","description":"One of three language levels for the generated text:\n1. Simple Language: Answers are short and simple, using easy words and a clear structure.\n2. Plain Language: Answers are short and the assistant explains complicated terms.\n3. Detailed Language: Answers are not simplified and the assistant answers in detail.\n","type":"string","enum":["simple","plain","detailed"],"example":"plain","isRequired":true,"uniqueKey":"language_level","typeLabel":"enum\u003cstring>"},"answer":{"title":"Message","description":"Represents a message within an `Explanation` or a `Knowledge Base Chat`.\nFor `Explanations` - An `assistant` message is either an initial `Explanation` for the document when no messages were provided in the request or an answer to a user message in the provided conversation history.\n","type":"object","additionalProperties":false,"properties":{"role":{"description":"The entity that produced the message. One of `user` or `assistant`.","type":"string","enum":["user","assistant"],"isRequired":true,"uniqueKey":"answer.role","typeLabel":"enum\u003cstring>"},"content":{"description":"The content of the message. The maximum length is 16,000 characters.","type":"string","maxLength":16000,"isRequired":true,"uniqueKey":"answer.content","typeLabel":"string"},"references":{"type":"array","items":{"title":"Reference","description":"Represents a reference to a `Source` that was used to generate the answer.\nThe reference is used to provide backlinks to the original source and to provide context for the generated answer.\n","type":"object","additionalProperties":false,"properties":{"text":{"description":"String in the message content that needs to be replaced.","type":"string","maxLength":8,"example":"[R1]","isRequired":true,"uniqueKey":"answer.references.items.[INDEX].text","typeLabel":"string"},"source_id":{"description":"What `Source` the generated answer depended on.","maxLength":29,"pattern":"^src_[a-zA-Z0-9]{25}$","type":"string","isRequired":true,"uniqueKey":"answer.references.items.[INDEX].source_id","typeLabel":"string"},"page_number":{"oneOf":[{"description":"The page number in the `Source` the generated answer depended on. Only applicable for documents.","type":"integer","format":"int32","example":5,"minimum":1,"maximum":1000,"uniqueKey":"answer.references.items.[INDEX].page_number.oneOf.0","typeLabel":"integer\u003cint32>"},{"description":"The page number in the `Source` the generated answer depended on. Only applicable for documents.","type":"null","format":"int32","example":5,"minimum":1,"maximum":1000,"uniqueKey":"answer.references.items.[INDEX].page_number.oneOf.1","typeLabel":"null"}],"uniqueKey":"answer.references.items.[INDEX].page_number","typeLabel":"integer\u003cint32> | null"},"backlink":{"description":"The backlink of the `Source`, so it can be called from the client.","type":"string","maxLength":512,"example":"https://www.example.com/text.pdf","uniqueKey":"answer.references.items.[INDEX].backlink","typeLabel":"string"},"custom_metadata":{"title":"CustomMetadata","description":"Custom optional metadata for a `Source` provided by a client. Up to 10 key-value pairs.","type":"object","additionalProperties":true,"maxProperties":10,"example":{"internal_tag":"general_documents"},"uniqueKey":"answer.references.items.[INDEX].custom_metadata","typeLabel":"CustomMetadata · object"}},"required":["text","source_id"],"example":{"text":"[R1]","source_id":"src_oXiYDg8QOc9JsOk86idRXiywD","page_number":5,"backlink":"https://www.totoy.ai/totoy-company-overview.pdf","custom_metadata":{"internal_tag":"general_documents"}},"uniqueKey":"answer.references.items.[INDEX]","typeLabel":"Reference · object"},"maxItems":50,"uniqueKey":"answer.references","typeLabel":"Reference · object[]"}},"required":["role","content"],"example":{"role":"assistant","content":"Hi!\nThe co-founders of Totoy are Benedikt Hielscher, Francis Rafal, Marcel Koller, Michael Perger and Simon Hoffmann.[R1]"},"isRequired":true,"uniqueKey":"answer","typeLabel":"Message · object"},"markdown_response":{"description":"Whether the response is a Markdown formatted text.","type":"boolean","example":true,"isRequired":true,"uniqueKey":"markdown_response","typeLabel":"boolean"},"knowledge_base_id":{"description":"The unique identifier of the `Knowledge Base` that was used for the `Chat`.","maxLength":28,"pattern":"^kb_[a-zA-Z0-9]{25}$","type":"string","example":"kb_feMfJbeqbAEj4u8K5HqmKpUbY","isRequired":true,"uniqueKey":"knowledge_base_id","typeLabel":"string"}},"required":["project_id","output_language","language_level","answer","markdown_response","knowledge_base_id"],"uniqueKey":"","typeLabel":"KnowledgeBaseChatResponse · object"},"examples":{"knowledge-base-chat-response-example-1":{"title":"knowledge-base-chat-response-example-1","description":"An example for a generated plain English answer to a question to a `Knowledge Base`.","value":{"project_id":"pj_avX7imfLaPcQnv5ckvGlOEBA9","output_language":"en","language_level":"plain","answer":{"role":"assistant","content":"Hi!\nThe co-founders of Totoy are Benedikt Hielscher, Francis Rafal, Marcel Koller, Michael Perger and Simon Hoffmann.[R1]","references":[{"text":"[R1]","source_id":"src_oXiYDg8QOc9JsOk86idRXiywD","page_number":5,"backlink":"https://www.totoy.ai/totoy-company-overview.pdf","custom_metadata":{"internal_tag":"general_documents"}}]},"knowledge_base_id":"kb_feMfJbeqbAEj4u8K5HqmKpUbY","markdown_response":true}},"knowledge-base-chat-response-example-2":{"title":"knowledge-base-chat-response-example-2","description":"An example for a generated plain English answer to a follow-up question to a `Knowledge Base` from Knowledge Base Chat Request Example 2.","value":{"project_id":"pj_avX7imfLaPcQnv5ckvGlOEBA9","output_language":"en","language_level":"plain","answer":{"role":"assistant","content":"They want to solve functional illiteracy[R1]. They want to achieve that by making complicated documents understandable for everyone.[R2]","references":[{"text":"[R1]","source_id":"src_oXiYDg8QOc9JsOk86idRXiywD","page_number":1,"backlink":"https://www.totoy.ai/totoy-company-overview.pdf","custom_metadata":{"internal_tag":"general_documents"}},{"text":"[R2]","source_id":"src_oXiYDg8QOc9JsOk86idRXiywD","page_number":2,"backlink":"https://www.totoy.ai/totoy-company-overview.pdf","custom_metadata":{"internal_tag":"general_documents"}}]},"knowledge_base_id":"kb_feMfJbeqbAEj4u8K5HqmKpUbY","markdown_response":true}}},"exampleType":"examples"}},"exampleType":"examples"},"67ac1335-7c5c-474f-a7d3-55efb2406a60":{"description":"Client Error","content":{"application/problem+json":{"schema":{"title":"Problem","description":"A Response Body for HTTP Problem Details in RFC 9457 format.","type":"object","additionalProperties":false,"properties":{"type":{"description":"A URI reference that identifies the problem type.","type":"string","maxLength":512,"example":"https://docs.totoy.ai/probs/out-of-credit","uniqueKey":"type","typeLabel":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string","maxLength":512,"example":"You do not have enough credit.","uniqueKey":"title","typeLabel":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer","format":"int32","example":403,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string","maxLength":4096,"example":"You do not have enough credit to perform this operation.","uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string","maxLength":512,"example":"/projects/pj_avX7imfLaPcQnv5ckvGlOEBA9","uniqueKey":"instance","typeLabel":"string"}},"uniqueKey":"","typeLabel":"Problem · object"},"examples":{"Example":{"title":"Example","value":{"type":"https://docs.totoy.ai/probs/out-of-credit","title":"You do not have enough credit.","status":403,"detail":"You do not have enough credit to perform this operation.","instance":"/projects/pj_avX7imfLaPcQnv5ckvGlOEBA9"}}},"exampleType":"generated"}},"exampleType":"generated"},"87c9dd6e-1c1f-419a-9e23-91c33781475b":{"description":"Server Error","content":{"application/problem+json":{"schema":{"title":"Problem","description":"A Response Body for HTTP Problem Details in RFC 9457 format.","type":"object","additionalProperties":false,"properties":{"type":{"description":"A URI reference that identifies the problem type.","type":"string","maxLength":512,"example":"https://docs.totoy.ai/probs/out-of-credit","uniqueKey":"type","typeLabel":"string"},"title":{"description":"A short, human-readable summary of the problem type.","type":"string","maxLength":512,"example":"You do not have enough credit.","uniqueKey":"title","typeLabel":"string"},"status":{"description":"The HTTP status code generated by the origin server for this occurrence of the problem.","type":"integer","format":"int32","example":403,"uniqueKey":"status","typeLabel":"integer\u003cint32>"},"detail":{"description":"A human-readable explanation specific to this occurrence of the problem.","type":"string","maxLength":4096,"example":"You do not have enough credit to perform this operation.","uniqueKey":"detail","typeLabel":"string"},"instance":{"description":"A URI reference that identifies the specific occurrence of the problem.","type":"string","maxLength":512,"example":"/projects/pj_avX7imfLaPcQnv5ckvGlOEBA9","uniqueKey":"instance","typeLabel":"string"}},"uniqueKey":"","typeLabel":"Problem · object"},"examples":{"Example":{"title":"Example","value":{"type":"https://docs.totoy.ai/probs/out-of-credit","title":"You do not have enough credit.","status":403,"detail":"You do not have enough credit to perform this operation.","instance":"/projects/pj_avX7imfLaPcQnv5ckvGlOEBA9"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"6187ac53-fd74-459c-85cb-43152350deb9":{"ApiKeyAuth":{"type":"http","scheme":"bearer","scopes":[]}}},"servers":{"5b2812cd-a513-4390-94ec-f12c067b1621":{"url":"https://api.totoy.ai/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"ApiKeyAuth","name":"Authorization"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"api-reference/openapi.yaml"},"subdomain":"totoygmbh","siteName":"Totoy Logo","title":"Creates a Knowledge Base Chat Response for the given Messages. - Totoy Logo","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-26T10:41:36.333Z","originalFileLocation":"api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Totoy Logo\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/totoygmbh/HYG3tSXE2aGHDGm-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/totoygmbh/HYG3tSXE2aGHDGm-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/totoygmbh/HYG3tSXE2aGHDGm-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/totoygmbh/HYG3tSXE2aGHDGm-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/totoygmbh/HYG3tSXE2aGHDGm-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/totoygmbh/HYG3tSXE2aGHDGm-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/totoygmbh/HYG3tSXE2aGHDGm-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/totoygmbh/HYG3tSXE2aGHDGm-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/totoygmbh/HYG3tSXE2aGHDGm-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Creates a Knowledge Base Chat Response for the given Messages. - Totoy Logo\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Totoy Logo\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.totoy.ai/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://totoygmbh.mintlify.app/_mintlify/api/og/v2?division=Knowledge+Bases\u0026amp;title=Creates+a+Knowledge+Base+Chat+Response+for+the+given+Messages.\u0026amp;theme=cc41ad62ba01334151cd73da\u0026amp;signature=5b3cd6b74c2f4e17c3ec1fa88cb0bac7186b36489a2a048bd0d8ead2f996db8c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Creates a Knowledge Base Chat Response for the given Messages. - Totoy Logo\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://totoygmbh.mintlify.app/_mintlify/api/og/v2?division=Knowledge+Bases\u0026amp;title=Creates+a+Knowledge+Base+Chat+Response+for+the+given+Messages.\u0026amp;theme=cc41ad62ba01334151cd73da\u0026amp;signature=5b3cd6b74c2f4e17c3ec1fa88cb0bac7186b36489a2a048bd0d8ead2f996db8c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/totoygmbh/HYG3tSXE2aGHDGm-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Totoy Logo\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6C59F7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.totoy.ai/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.totoy.ai/#organization\",\"name\":\"Totoy Logo\",\"url\":\"https://docs.totoy.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/totoygmbh/VcohGNXAGccdCEWG/logo/Full%20Logo%20Dark%20Font.svg?fit=max\u0026auto=format\u0026n=VcohGNXAGccdCEWG\u0026q=85\u0026s=7305a4b5c2a2ee7fbb383369e681b50c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.totoy.ai#website\",\"name\":\"Totoy Logo\",\"url\":\"https://docs.totoy.ai\",\"publisher\":{\"@id\":\"https://docs.totoy.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.totoy.ai/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages#webpage\",\"url\":\"https://docs.totoy.ai/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages\",\"name\":\"Creates a Knowledge Base Chat Response for the given Messages.\",\"dateModified\":\"2026-05-26T10:41:36.333Z\",\"isPartOf\":{\"@id\":\"https://docs.totoy.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.totoy.ai/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.totoy.ai/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Knowledge Bases\",\"item\":\"https://docs.totoy.ai/api-reference/knowledge-bases/returns-a-list-of-knowledge-bases\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Creates a Knowledge Base Chat Response for the given Messages.\",\"item\":\"https://docs.totoy.ai/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.totoy.ai/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages#apireference\",\"headline\":\"Creates a Knowledge Base Chat Response for the given Messages.\",\"name\":\"Creates a Knowledge Base Chat Response for the given Messages.\",\"url\":\"https://docs.totoy.ai/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages\",\"mainEntityOfPage\":{\"@id\":\"https://docs.totoy.ai/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages#webpage\"},\"dateModified\":\"2026-05-26T10:41:36.333Z\",\"publisher\":{\"@id\":\"https://docs.totoy.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.totoy.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Totoy Logo\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Totoy Logo","nav":{"global":null,"anchors":[{"anchor":"API Reference","icon":"square-terminal","color":{"light":"#6C59F7","dark":"#6C59F7"},"groups":[{"group":"Totoy API","pages":[{"title":"Api reference","href":"/api-reference"}]},{"group":"Explanation","pages":[{"title":"Explains a document in any language","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /explanation","href":"/api-reference/explanation/explains-a-document-in-any-language"}]},{"group":"Knowledge Bases","pages":[{"title":"Returns a list of Knowledge Bases.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /knowledge-bases","href":"/api-reference/knowledge-bases/returns-a-list-of-knowledge-bases"},{"title":"Creates a Knowledge Base.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /knowledge-bases","href":"/api-reference/knowledge-bases/creates-a-knowledge-base"},{"title":"Retrieves a Knowledge Base.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /knowledge-bases/{knowledge_base_id}","href":"/api-reference/knowledge-bases/retrieves-a-knowledge-base"},{"title":"Deletes a Knowledge Base.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /knowledge-bases/{knowledge_base_id}","href":"/api-reference/knowledge-bases/deletes-a-knowledge-base"},{"title":"Modifies a Knowledge Base.","description":null,"deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /knowledge-bases/{knowledge_base_id}","href":"/api-reference/knowledge-bases/modifies-a-knowledge-base"},{"title":"Creates a Knowledge Base Chat Response for the given Messages.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /knowledge-bases/{knowledge_base_id}/chat","href":"/api-reference/knowledge-bases/creates-a-knowledge-base-chat-response-for-the-given-messages"},{"title":"Returns a list of Knowledge Base Sources.","description":null,"deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /knowledge-bases/{knowledge_base_id}/sources","href":"/api-reference/knowledge-bases/returns-a-list-of-knowledge-base-sources"},{"title":"Adds Sources to a Knowledge Base.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /knowledge-bases/{knowledge_base_id}/sources","href":"/api-reference/knowledge-bases/adds-sources-to-a-knowledge-base"},{"title":"Retrieves a Knowledge Base Source.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /knowledge-bases/{knowledge_base_id}/sources/{source_id}","href":"/api-reference/knowledge-bases/retrieves-a-knowledge-base-source"},{"title":"Removes a Knowledge Base Source from a Knowledge Base.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /knowledge-bases/{knowledge_base_id}/sources/{source_id}","href":"/api-reference/knowledge-bases/removes-a-knowledge-base-source-from-a-knowledge-base"}]},{"group":"Sources","pages":[{"title":"Returns a list of Sources.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /sources","href":"/api-reference/sources/returns-a-list-of-sources"},{"title":"Creates a Document or Text Source","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /sources","href":"/api-reference/sources/creates-a-document-or-text-source"},{"title":"Retrieves a Source.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /sources/{source_id}","href":"/api-reference/sources/retrieves-a-source"},{"title":"Deletes a Source.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /sources/{source_id}","href":"/api-reference/sources/deletes-a-source"},{"title":"Modifies a Source.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /sources/{source_id}","href":"/api-reference/sources/modifies-a-source"},{"title":"Retrieves the content of a Source.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /sources/{source_id}/content","href":"/api-reference/sources/retrieves-the-content-of-a-source"}]},{"group":"Projects","pages":[{"title":"Returns a list of Projects.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /projects","href":"/api-reference/projects/returns-a-list-of-projects"},{"title":"Creates a Project.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml post /projects","href":"/api-reference/projects/creates-a-project"},{"title":"Retrieves a Project.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /projects/{project_id}","href":"/api-reference/projects/retrieves-a-project"},{"title":"Deletes a Project and all its associated resources.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml delete /projects/{project_id}","href":"/api-reference/projects/deletes-a-project-and-all-its-associated-resources"},{"title":"Modifies a Project.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml patch /projects/{project_id}","href":"/api-reference/projects/modifies-a-project"}]},{"group":"Organization","pages":[{"title":"Returns the Organization details.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.yaml get /organization","href":"/api-reference/organization/returns-the-organization-details"}]}]}]},"title":"Creates a Knowledge Base Chat Response for the given Messages. - Totoy Logo","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Bbp7I60D.js","utils-C3RIvJha.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DqD-vLt8.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B31Loprg.js","snippetPresets-DKpk-b8t.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Cj65AhOR.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BXtn5gcC.js","shallow-RY2b03Cp.js","getApiPlaygroundDisplay-B0jeiPk3.js","CodeSnippet-CYgBjjwn.js","CodeSnippets-DOngDrYB.js","Page-n7I5XbKb.js","getPastedJson-DRQbJx-T.js","icon-CQiQCicY.js","MethodPill-BKTLdNtu.js","DuplicateIcon-B9jpAdat.js","createIcon-DCddRrXv.js","DynamicMarkdown-a8hUKrw6.js","SectionHeading-eECVV2eH.js","axios-vUo_bRtp.js","Markdown--GF7ZIpf.js","clsx-DZLdJUrt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-2LoAhjKH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Zwc0ZncM.js"]}