Objects
ChatRequest
Request for an assistant answer: the latest turns of the conversation, the collection, search settings, the answer mode, export, a limit to specific cards, the conversation, the origin of the question, and tools.
Fields
items ≥ 1
collectionstringDefault: "default"
tagsarray of string | nullexportstring | nullcard_idsarray of string | nullitems ≤ 50
streambooleanDefault: false
conversation_idstring | nulllength ≤ 64
originstring | nulltoolsboolean | nullbypass_cachebooleanDo not take the answer from the answer cache (the “Get a fresh answer” button under a cached answer). The fresh answer replaces the cached entry.
Default: false
languagestring | nullAnswer language: an ISO 639-1 code (
de,en,ru, …) to answer in that language. Withautoor without the field, the language is detected from the question. The interface passes the language of a suggestion in another language explicitly (Starter.language).scopeChatScope | nullScope of the question: several collections, a source, tags and a period. The collections of the scope replace
collection. A source narrows the answer to its collection (and its own cards). Tags are added totags. The period limits financial answers to that period. You can select only what the user can see (collections:collections.no_access/collections.not_found; source:sources.not_found). Withconversation_id, the scope is saved in the conversation. Without the field, the conversation's scope applies;nullor an empty scope clears it.request_idstringIdempotency key of the question. Send the same key in every retry of the stream for one question (a retry after a disconnect; here
Last-Event-IDdoes not continue the stream and is only logged). A retry with the key of an answer that is already saved does not create a second question: the saved result is sent again as onedoneevent (and atokenwith the text), even if the question or credit limit is exhausted. If the previous answer is still being generated for a disconnected client, that generation stops and the answer is generated anew.length ≤ 64
version_ofinteger (int64)Creates a new version of this question's turn in the conversation (
question_idfrom the feed): an edited question (new text inmessages), a regenerated answer (the same text, usually withbypass_cache), or the same question with anotherquality(for example,preciseafter afastanswer). The previous question and answer pair is kept. The turns after it stay in its branch and are hidden from the feed while the new version is selected (FeedItem.versions,POST /v1/conversations/{conv_id}/versions). The history used for the answer is the selected branch up to this turn. Thequalityof a version does not change the conversation's settings. Requiresconversation_id; a question from another conversation returns404 questions.not_found.qualitystringBalance between speed and accuracy of the search behind the result:
fastis quicker,preciseis more accurate. Default:precise.Allowed values:
fastprecise