{ "slug": "is-slack-supported-on-anteon-5fdf19ad-de4c-4f07-9dff-0fe1003dccac", "content": "# Is Slack supported on Anteon?\n\n**Yes, Slack is supported on Anteon.** You can integrate Slack to receive notifications about anomalies in your Kubernetes cluster. This integration is available for Anteon Cloud and the Self-Hosted Enterprise Edition. For the Self-Hosted version, you need to create a Slack application and configure it with specific OAuth scopes. Once set up, you can receive alerts directly in your Slack channels. For detailed instructions, refer to the [Slack Integration Guide](https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/).", "question": "Is Slack supported on Anteon?", "date_updated": "22 January 2025", "trust_score": 76, "references": [ { "link": "https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/", "icon": "https://getanteon.com/img/favicon.ico", "title": "📧 Slack Integration | Anteon" } ], "session_id": "3cdbdc4c-023f-45ce-832f-f1881b4f238b", "question_url": "https://app.gurubase.io/g/gurubase/is-slack-supported-on-anteon-5fdf19ad-de4c-4f07-9dff-0fe1003dccac", "can_receive_feedback": true}
# Is Slack supported on Anteon?**Yes, Slack is supported on Anteon.** You can integrate Slack to receive notifications about anomalies in your Kubernetes cluster. This integration is available for Anteon Cloud and the Self-Hosted Enterprise Edition. For the Self-Hosted version, you need to create a Slack application and configure it with specific OAuth scopes. Once set up, you can receive alerts directly in your Slack channels. For detailed instructions, refer to the [Slack Integration Guide](https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/).
{ "msg": "<error message>"}
{ "msg": "Invalid API key"}
{ "msg": "Request was throttled. Expected available in 56 seconds."}
{ "msg": "External user ID mismatch for this session. Code: S-902"}
{ "msg": "This question is not related to <Guru name>.", "code": "QUESTION_NOT_RELATED"}
{ "msg": "<Guru name> Guru doesn't have enough data as a source to generate a reliable answer for this question.", "code": "NOT_ENOUGH_DATA"}
{ "slug": "is-slack-supported-on-anteon-5fdf19ad-de4c-4f07-9dff-0fe1003dccac", "content": "# Is Slack supported on Anteon?\n\n**Yes, Slack is supported on Anteon.** You can integrate Slack to receive notifications about anomalies in your Kubernetes cluster. This integration is available for Anteon Cloud and the Self-Hosted Enterprise Edition. For the Self-Hosted version, you need to create a Slack application and configure it with specific OAuth scopes. Once set up, you can receive alerts directly in your Slack channels. For detailed instructions, refer to the [Slack Integration Guide](https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/).", "question": "Is Slack supported on Anteon?", "date_updated": "22 January 2025", "trust_score": 76, "references": [ { "link": "https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/", "icon": "https://getanteon.com/img/favicon.ico", "title": "📧 Slack Integration | Anteon" } ], "session_id": "3cdbdc4c-023f-45ce-832f-f1881b4f238b", "question_url": "https://app.gurubase.io/g/gurubase/is-slack-supported-on-anteon-5fdf19ad-de4c-4f07-9dff-0fe1003dccac", "can_receive_feedback": true}
# Is Slack supported on Anteon?**Yes, Slack is supported on Anteon.** You can integrate Slack to receive notifications about anomalies in your Kubernetes cluster. This integration is available for Anteon Cloud and the Self-Hosted Enterprise Edition. For the Self-Hosted version, you need to create a Slack application and configure it with specific OAuth scopes. Once set up, you can receive alerts directly in your Slack channels. For detailed instructions, refer to the [Slack Integration Guide](https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/).
{ "msg": "<error message>"}
{ "msg": "Invalid API key"}
{ "msg": "Request was throttled. Expected available in 56 seconds."}
{ "msg": "External user ID mismatch for this session. Code: S-902"}
{ "msg": "This question is not related to <Guru name>.", "code": "QUESTION_NOT_RELATED"}
{ "msg": "<Guru name> Guru doesn't have enough data as a source to generate a reliable answer for this question.", "code": "NOT_ENOUGH_DATA"}
Ask a question to your AI-powered Q&A assistant and receive a detailed response with references.
To ask follow-up questions, include the session_id from a previous response in your request. This allows the Guru to maintain context of the conversation.
Selects the answer pipeline for this request. Accepted values:
chat (default): the classic single-pass answer pipeline.
agent: the autonomous tool loop, which lets the Guru chain Agentic Actions and other tools before answering.
agent requires an agent-capable Guru (multi-step answers enabled with at least one usable tool). If the Guru does not qualify, the request silently falls back to chat. Any unrecognized value is also treated as chat.
Maintain conversation context for follow-up questions. When a question is asked, the response includes a session_id that can be used in subsequent requests. On the Gurubase platform, these conversation sessions are called “Binges”.
External user identifier for tracking user-specific conversation sessions. When provided, this ID is stored in the session. If a session already exists with a different external_user_id, the request will be rejected.
Optional free-form caller labels attached to the question. The object is stored with the question; it is never injected into the prompt on its own.Limits:
Flat object only (no nested objects or arrays); at most 10 keys.
Keys are strings up to 64 characters and must match [A-Za-z0-9_.-]+.
Keys starting with gurubase_ are reserved and rejected.
Values must be a string, number, or boolean. String values are limited to 256 characters.
null values are accepted and dropped from the stored object before persistence (the key is not stored).
Any other violation returns HTTP 400 before any answer is generated.
Gurubase can configure a Guru to map a specific metadata key onto a subject inside the stored user profile (contact support to enable it). For example, an accountId key can select one account from a profile that covers several, pushed via Upsert Profiles. When such a mapping is configured on the Guru, sending that key on the request pins the answer to that subject: only that subject’s profile detail is used, memories about other subjects are held back, and identical wording asked about a different subject gets its own answer.Subject pinning requires the request to also include the same external_user_id used when the profile was pushed via Upsert Profiles; that identifier is how the profile is looked up. Without it no profile is loaded and the mapped metadata key does not pin the answer. Omit the mapped key to answer against the whole profile. An unknown subject id degrades to an unpinned answer rather than failing the request.
Optional list of data source IDs to scope the answer to. When provided, retrieval only reads from these sources, so a question like “what did we decide in Monday’s standup” can be pinned to a single transcript instead of the full knowledge base. IDs are the numeric identifiers returned by Create / Get Data Sources and must belong to the same Guru.
Whether the Guru’s End-User Memory is read from or written to for this request. Set to false when a bot or integration is asking on behalf of a user whose profile should not be built up (for example, a meeting assistant asking on a participant’s behalf). Disables both reading and writing for the single request.
Optional list of image attachments to include with the question. Each item is an object with:
data (string): Base64-encoded image as a data URL, formatted as data:<mime>;base64,<payload> (see the encode_binary helper in the “Asking With Attachments” example).
name (string): File name (e.g. screenshot.png).
type (string): MIME type (e.g. image/png).
Item count and per-file size are subject to the Guru’s limits. Images exceeding the limits are silently skipped and the response includes a note with how many were dropped.
Optional list of log file attachments to include with the question. Each item is an object with:
data (string): Raw UTF-8 log text (see the read_log helper in the “Asking With Attachments” example). Not base64-encoded.
name (string): File name (e.g. app.log).
Item count and per-file size are subject to the Guru’s limits. Log files exceeding the limits are silently skipped and the response includes a note with how many were dropped.
Optional list of PDF attachments to include with the question. Each item is an object with:
data (string): Base64-encoded PDF as a data URL, formatted as data:<mime>;base64,<payload> (see the encode_binary helper in the “Asking With Attachments” example).
name (string): File name (e.g. doc.pdf).
type (string): MIME type (typically application/pdf).
Item count and per-file size are subject to the Guru’s limits. Unlike images and log files, PDFs are validated upfront: if the request exceeds the limits, the endpoint returns HTTP 400 and no answer is generated.
Present and true only when the reference is an attachment (log, PDF, or image) that was uploaded in an earlier turn of the same conversation session and is being surfaced again on a follow-up. Omitted for fresh attachments and knowledge base sources.
Whether the question can receive votes and feedback. Returns false for simple interactions and clarifications, true for normal answers. See the Record Vote endpoint for more information on providing feedbacks and votes.
When stream=true, the response will be a text stream containing only the answer content in chunks, not the full JSON object. The JSON response format shown below applies only when stream=false (default).
{ "slug": "is-slack-supported-on-anteon-5fdf19ad-de4c-4f07-9dff-0fe1003dccac", "content": "# Is Slack supported on Anteon?\n\n**Yes, Slack is supported on Anteon.** You can integrate Slack to receive notifications about anomalies in your Kubernetes cluster. This integration is available for Anteon Cloud and the Self-Hosted Enterprise Edition. For the Self-Hosted version, you need to create a Slack application and configure it with specific OAuth scopes. Once set up, you can receive alerts directly in your Slack channels. For detailed instructions, refer to the [Slack Integration Guide](https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/).", "question": "Is Slack supported on Anteon?", "date_updated": "22 January 2025", "trust_score": 76, "references": [ { "link": "https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/", "icon": "https://getanteon.com/img/favicon.ico", "title": "📧 Slack Integration | Anteon" } ], "session_id": "3cdbdc4c-023f-45ce-832f-f1881b4f238b", "question_url": "https://app.gurubase.io/g/gurubase/is-slack-supported-on-anteon-5fdf19ad-de4c-4f07-9dff-0fe1003dccac", "can_receive_feedback": true}
# Is Slack supported on Anteon?**Yes, Slack is supported on Anteon.** You can integrate Slack to receive notifications about anomalies in your Kubernetes cluster. This integration is available for Anteon Cloud and the Self-Hosted Enterprise Edition. For the Self-Hosted version, you need to create a Slack application and configure it with specific OAuth scopes. Once set up, you can receive alerts directly in your Slack channels. For detailed instructions, refer to the [Slack Integration Guide](https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/).
{ "msg": "<error message>"}
{ "msg": "Invalid API key"}
{ "msg": "Request was throttled. Expected available in 56 seconds."}
{ "msg": "External user ID mismatch for this session. Code: S-902"}
{ "msg": "This question is not related to <Guru name>.", "code": "QUESTION_NOT_RELATED"}
{ "msg": "<Guru name> Guru doesn't have enough data as a source to generate a reliable answer for this question.", "code": "NOT_ENOUGH_DATA"}
When the Guru refuses a question, the error response carries a stable code field so callers can branch without matching on the wording of msg. QUESTION_NOT_RELATED means the question falls outside the Guru’s topic; NOT_ENOUGH_DATA means the knowledge base did not contain enough context to answer confidently. Branch on code, not on msg: a Guru can set its own refusal messages, and msg then carries that text.
Stream a response for real-time output, then fetch the completed answer to get metadata like trust_score, references, and session_id.
// Configurationconst API_KEY = 'your-api-key-here';const BASE_URL = 'https://api.gurubase.io/api/v1';const GURU_SLUG = 'your-guru-slug';// Simple stream exampleasync function askGurubase(question) { console.log("Asking question:", question); const response = await fetch(`${BASE_URL}/${GURU_SLUG}/answer/`, { method: 'POST', headers: { 'X-API-KEY': API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ question: question, stream: true }) }); // Read stream chunks const reader = response.body.getReader(); const decoder = new TextDecoder(); console.log("Answer below:\n"); while (true) { const { done, value } = await reader.read(); if (done) break; const chunk = decoder.decode(value); process.stdout.write(chunk.replace(/\n/g, ' ')); } console.log("\n");}// Fetch existing answer with metadataasync function fetchExisting(question) { const response = await fetch(`${BASE_URL}/${GURU_SLUG}/answer/`, { method: 'POST', headers: { 'X-API-KEY': API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ question: question, stream: false, fetch_existing: true }) }); const data = await response.json(); console.log('Answer JSON:'); console.log(data); return data;}// Usageconst question = "Does Gurubase support Slack?";// 1. Ask with streamawait askGurubase(question);// 2. Then fetch the answer from the db (for the JSON fields)await fetchExisting(question);
Ask a question with image, log, and PDF attachments. Images and PDFs are base64-encoded into data:<mime>;base64,... URLs; log files are sent as raw UTF-8 text.Fill in the Config block, list file paths under IMAGE_PATHS, LOG_PATHS, and PDF_PATHS, then run:
import base64import jsonimport mimetypesimport sysfrom pathlib import Pathfrom typing import Listimport requests# ---------- Config ----------BASE_URL = "https://api.gurubase.io/api/v1"API_KEY = "your-api-key-here"GURU_SLUG = "your-guru-slug"QUESTION = "Summarize the attached files."STREAM = False# ---------- Attachments (absolute paths) ----------IMAGE_PATHS: List[str] = [ # "/path/to/screenshot.png",]LOG_PATHS: List[str] = [ # "/path/to/app.log",]PDF_PATHS: List[str] = [ # "/path/to/doc.pdf",]def encode_binary(path: Path, fallback_mime: str) -> dict: mime = mimetypes.guess_type(path.name)[0] or fallback_mime b64 = base64.b64encode(path.read_bytes()).decode("ascii") return { "data": f"data:{mime};base64,{b64}", "name": path.name, "type": mime, }def read_log(path: Path) -> dict: return { "data": path.read_text(encoding="utf-8", errors="replace"), "name": path.name, }def build_payload() -> dict: payload: dict = {"question": QUESTION, "stream": STREAM} if IMAGE_PATHS: payload["images"] = [encode_binary(Path(p), "image/png") for p in IMAGE_PATHS] if LOG_PATHS: payload["log_files"] = [read_log(Path(p)) for p in LOG_PATHS] if PDF_PATHS: payload["pdf_files"] = [encode_binary(Path(p), "application/pdf") for p in PDF_PATHS] return payloaddef main() -> int: url = f"{BASE_URL.rstrip('/')}/{GURU_SLUG}/answer/" headers = {"x-api-key": API_KEY, "Content-Type": "application/json"} payload = build_payload() resp = requests.post(url, headers=headers, json=payload, timeout=180, stream=STREAM) if STREAM: for chunk in resp.iter_content(chunk_size=None, decode_unicode=True): if chunk: sys.stdout.write(chunk) sys.stdout.flush() sys.stdout.write("\n") return 0 if resp.ok else 1 try: print(json.dumps(resp.json(), indent=2, ensure_ascii=False)) except ValueError: print(resp.text) return 0 if resp.ok else 1if __name__ == "__main__": sys.exit(main())
PDFs are validated upfront: if the request exceeds the Guru’s PDF count or per-file size limit, the endpoint returns HTTP 400 and no answer is generated.Images and log files that exceed the Guru’s count or size limits are silently skipped during answering, and the response includes a note stating how many attachments were dropped.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Gurubase","colors":{"primary":"#006BFF","light":"#3389FF","dark":"#006BFF"},"logo":{"light":"https://mintcdn.com/gurubase/0kE9Hd9k_SJDKu8Q/logo/light.svg?fit=max\u0026auto=format\u0026n=0kE9Hd9k_SJDKu8Q\u0026q=85\u0026s=e80be9ea5250513afdd5cac9e9cf40eb","dark":"https://mintcdn.com/gurubase/0kE9Hd9k_SJDKu8Q/logo/dark.svg?fit=max\u0026auto=format\u0026n=0kE9Hd9k_SJDKu8Q\u0026q=85\u0026s=95fad17b670ff55e15b56ec9a86a5e6a"},"favicon":"https://mintcdn.com/gurubase/7wgpr3jQ02zKlT61/favicon.svg?fit=max\u0026auto=format\u0026n=7wgpr3jQ02zKlT61\u0026q=85\u0026s=3c3872b3bfdd7703dfb3c23febfa08dd","api":{"mdx":{"auth":{"method":"key","name":"x-api-key"},"server":"https://api.gurubase.io/api/v1/"}},"navbar":{"links":[],"primary":{"type":"button","label":"Gurubase.io","href":"https://gurubase.io/"}},"footer":{"socials":{"twitter":"https://x.com/gurubaseio","linkedin":"https://www.linkedin.com/company/gurubase"},"links":[{"header":"Legal","items":[{"label":"Privacy Policy","href":"https://gurubase.io/privacy-policy"},{"label":"Cookie Policy","href":"https://gurubase.io/cookie-policy"}]},{"header":"More","items":[{"label":"Siper (Turkish PII Masking)","href":"https://siper.gurubase.ai/"}]}]},"seo":{"metatags":{"og:site_name":"Gurubase Documentation","og:type":"website","og:locale":"en_US","twitter:card":"summary_large_image","twitter:site":"@gurubaseio","robots":"index, follow","author":"Gurubase","keywords":"AI agents, hallucination-resistant AI, RAG, trust score, citations, agentic actions, MCP, MCP server, MCP client, on-premise AI, enterprise AI, knowledge base, documentation"},"indexing":"navigable"},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Try Gurubase","icon":"sparkles","href":"https://gurubase.io/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"gurubase","hasAudioNarration":false,"actualSubdomain":"gurubase","customDomains":["docs.gurubase.ai"],"gitSource":{"type":"github","owner":"gurubase","repo":"gurubase-docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af1b880e7b89d498acbf034","clientVersion":"0.0.4124","searchFilterCounts":[{"language":"default","tag":"Documentation","count":47},{"language":"default","tag":"API Reference","count":26},{"language":"default","tag":"Guides","count":25},{"language":"default","tag":"Endpoints","count":24},{"language":"default","tag":"Integrations","count":15},{"language":"default","tag":"Bots","count":7},{"language":"default","tag":"Ingestion","count":6},{"language":"default","tag":"Get Started","count":4},{"language":"default","tag":"Advanced","count":3},{"language":"default","tag":"API Documentation","count":2}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"workos-sso-scim","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},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/endpoints/ask-question","slug":"/api-reference/endpoints/ask-question","pageMetadata":{"title":"Ask Question","icon":"message-circle-question-mark","api":"POST /{guru_slug}/answer/","description":"Ask a question to your Guru","href":"/api-reference/endpoints/ask-question"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Ask a question to your Guru\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,ResponseField,Tab,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Ask a question to your AI-powered Q\u0026A assistant and receive a detailed response with references.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`To ask follow-up questions, include the `,_jsx(_components.code,{children:`session_id`}),` from a previous response in your request. This allows the Guru to maintain context of the conversation.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`guru_slug`,type:`string`,required:true,id:`param-guru-slug`,children:_jsx(_components.p,{children:`The slug of the Guru to ask a question to`})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`x-api-key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsxs(_components.p,{children:[`Your API key for authentication. You can obtain your API key from the `,_jsx(_components.a,{href:`https://app.gurubase.io/api-keys`,children:`Gurubase dashboard`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`question`,type:`string`,required:true,id:`param-question`,children:_jsx(_components.p,{children:`The question to ask your Guru`})}),`\n`,_jsx(ParamField,{body:`stream`,type:`boolean`,default:false,id:`param-stream`,children:_jsx(_components.p,{children:`Whether to stream the response or not. If true, only the content of the response will be returned in chunks.`})}),`\n`,_jsxs(ParamField,{body:`mode`,type:`string`,default:`chat`,id:`param-mode`,children:[_jsx(_components.p,{children:`Selects the answer pipeline for this request. Accepted values:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`chat`}),` (default): the classic single-pass answer pipeline.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`agent`}),`: the autonomous tool loop, which lets the Guru chain `,_jsx(_components.a,{href:`/guides/agents`,children:`Agentic Actions`}),` and other tools before answering.`]}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`agent`}),` requires an agent-capable Guru (multi-step answers enabled with at least one usable tool). If the Guru does not qualify, the request silently falls back to `,_jsx(_components.code,{children:`chat`}),`. Any unrecognized value is also treated as `,_jsx(_components.code,{children:`chat`}),`.`]})]}),`\n`,_jsx(ParamField,{body:`session_id`,type:`string`,id:`param-session-id`,children:_jsx(_components.p,{children:`Maintain conversation context for follow-up questions. When a question is asked, the response includes a session_id that can be used in subsequent requests. On the Gurubase platform, these conversation sessions are called “Binges”.`})}),`\n`,_jsx(ParamField,{body:`external_user_id`,type:`string`,id:`param-external-user-id`,children:_jsx(_components.p,{children:`External user identifier for tracking user-specific conversation sessions. When provided, this ID is stored in the session. If a session already exists with a different external_user_id, the request will be rejected.`})}),`\n`,_jsxs(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:[_jsx(_components.p,{children:`Optional free-form caller labels attached to the question. The object is stored with the question; it is never injected into the prompt on its own.`}),_jsx(_components.p,{children:`Limits:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Flat object only (no nested objects or arrays); at most 10 keys.`}),`\n`,_jsxs(_components.li,{children:[`Keys are strings up to 64 characters and must match `,_jsx(_components.code,{children:`[A-Za-z0-9_.-]+`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Keys starting with `,_jsx(_components.code,{children:`gurubase_`}),` are reserved and rejected.`]}),`\n`,_jsx(_components.li,{children:`Values must be a string, number, or boolean. String values are limited to 256 characters.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`null`}),` values are accepted and dropped from the stored object before persistence (the key is not stored).`]}),`\n`,_jsx(_components.li,{children:`Any other violation returns HTTP 400 before any answer is generated.`}),`\n`]}),_jsxs(_components.p,{children:[`Gurubase can configure a Guru to map a specific metadata key onto a subject inside the stored user profile (contact support to enable it). For example, an `,_jsx(_components.code,{children:`accountId`}),` key can select one account from a profile that covers several, pushed via `,_jsx(_components.a,{href:`/api-reference/endpoints/upsert-profiles`,children:`Upsert Profiles`}),`. When such a mapping is configured on the Guru, sending that key on the request pins the answer to that subject: only that subject’s profile detail is used, memories about other subjects are held back, and identical wording asked about a different subject gets its own answer.`]}),_jsxs(_components.p,{children:[`Subject pinning requires the request to also include the same `,_jsx(_components.code,{children:`external_user_id`}),` used when the profile was pushed via Upsert Profiles; that identifier is how the profile is looked up. Without it no profile is loaded and the mapped metadata key does not pin the answer. Omit the mapped key to answer against the whole profile. An unknown subject id degrades to an unpinned answer rather than failing the request.`]})]}),`\n`,_jsx(ParamField,{body:`fetch_existing`,type:`boolean`,default:false,id:`param-fetch-existing`,children:_jsx(_components.p,{children:`Fetch an existing answer. Do not ask a new question (generally used after streaming to fetch the answer fields like references etc.).`})}),`\n`,_jsx(ParamField,{body:`selected_sources`,type:`number[]`,id:`param-selected-sources`,children:_jsxs(_components.p,{children:[`Optional list of data source IDs to scope the answer to. When provided, retrieval only reads from these sources, so a question like “what did we decide in Monday’s standup” can be pinned to a single transcript instead of the full knowledge base. IDs are the numeric identifiers returned by `,_jsx(_components.a,{href:`/api-reference/endpoints/create-datasources`,children:`Create`}),` / `,_jsx(_components.a,{href:`/api-reference/endpoints/get-datasources`,children:`Get Data Sources`}),` and must belong to the same Guru.`]})}),`\n`,_jsx(ParamField,{body:`selected_labels`,type:`string[]`,id:`param-selected-labels`,children:_jsx(_components.p,{children:`Optional list of data source labels to scope the answer to. Only sources tagged with at least one of the given labels are considered during retrieval.`})}),`\n`,_jsx(ParamField,{body:`use_user_memory`,type:`boolean`,default:true,id:`param-use-user-memory`,children:_jsxs(_components.p,{children:[`Whether the Guru’s `,_jsx(_components.a,{href:`/guides/memory`,children:`End-User Memory`}),` is read from or written to for this request. Set to `,_jsx(_components.code,{children:`false`}),` when a bot or integration is asking on behalf of a user whose profile should not be built up (for example, a meeting assistant asking on a participant’s behalf). Disables both reading and writing for the single request.`]})}),`\n`,_jsxs(ParamField,{body:`images`,type:`array`,id:`param-images`,children:[_jsx(_components.p,{children:`Optional list of image attachments to include with the question. Each item is an object with:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`data`}),` (string): Base64-encoded image as a data URL, formatted as `,_jsx(_components.code,{children:`data:\u003cmime>;base64,\u003cpayload>`}),` (see the `,_jsx(_components.code,{children:`encode_binary`}),` helper in the “Asking With Attachments” example).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`name`}),` (string): File name (e.g. `,_jsx(_components.code,{children:`screenshot.png`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`type`}),` (string): MIME type (e.g. `,_jsx(_components.code,{children:`image/png`}),`).`]}),`\n`]}),_jsx(_components.p,{children:`Item count and per-file size are subject to the Guru’s limits. Images exceeding the limits are silently skipped and the response includes a note with how many were dropped.`})]}),`\n`,_jsxs(ParamField,{body:`log_files`,type:`array`,id:`param-log-files`,children:[_jsx(_components.p,{children:`Optional list of log file attachments to include with the question. Each item is an object with:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`data`}),` (string): Raw UTF-8 log text (see the `,_jsx(_components.code,{children:`read_log`}),` helper in the “Asking With Attachments” example). Not base64-encoded.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`name`}),` (string): File name (e.g. `,_jsx(_components.code,{children:`app.log`}),`).`]}),`\n`]}),_jsx(_components.p,{children:`Item count and per-file size are subject to the Guru’s limits. Log files exceeding the limits are silently skipped and the response includes a note with how many were dropped.`})]}),`\n`,_jsxs(ParamField,{body:`pdf_files`,type:`array`,id:`param-pdf-files`,children:[_jsx(_components.p,{children:`Optional list of PDF attachments to include with the question. Each item is an object with:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`data`}),` (string): Base64-encoded PDF as a data URL, formatted as `,_jsx(_components.code,{children:`data:\u003cmime>;base64,\u003cpayload>`}),` (see the `,_jsx(_components.code,{children:`encode_binary`}),` helper in the “Asking With Attachments” example).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`name`}),` (string): File name (e.g. `,_jsx(_components.code,{children:`doc.pdf`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`type`}),` (string): MIME type (typically `,_jsx(_components.code,{children:`application/pdf`}),`).`]}),`\n`]}),_jsx(_components.p,{children:`Item count and per-file size are subject to the Guru’s limits. Unlike images and log files, PDFs are validated upfront: if the request exceeds the limits, the endpoint returns HTTP 400 and no answer is generated.`})]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`slug`,type:`string`,id:`param-slug`,children:_jsx(_components.p,{children:`Unique identifier for the question-answer pair`})}),`\n`,_jsx(ResponseField,{name:`content`,type:`string`,id:`param-content`,children:_jsx(_components.p,{children:`The answer in Markdown format`})}),`\n`,_jsx(ResponseField,{name:`question`,type:`string`,id:`param-question-1`,children:_jsx(_components.p,{children:`The original question`})}),`\n`,_jsx(ResponseField,{name:`date_updated`,type:`string`,id:`param-date-updated`,children:_jsx(_components.p,{children:`The date when the answer was generated`})}),`\n`,_jsx(ResponseField,{name:`trust_score`,type:`number`,id:`param-trust-score`,children:_jsx(_components.p,{children:`How closely the retrieved sources match the question (0-100). It is not the probability that the answer is correct.`})}),`\n`,_jsxs(ResponseField,{name:`references`,type:`array`,id:`param-references`,children:[_jsx(_components.p,{children:`Array of reference sources used to generate the answer`}),_jsxs(Expandable,{title:`Reference Object`,children:[_jsx(ResponseField,{name:`link`,type:`string`,id:`param-link`,children:_jsx(_components.p,{children:`URL of the reference`})}),_jsx(ResponseField,{name:`icon`,type:`string`,id:`param-icon`,children:_jsx(_components.p,{children:`Icon URL for the reference source`})}),_jsx(ResponseField,{name:`title`,type:`string`,id:`param-title`,children:_jsx(_components.p,{children:`Title of the reference`})}),_jsx(ResponseField,{name:`inherited`,type:`boolean`,id:`param-inherited`,children:_jsxs(_components.p,{children:[`Present and `,_jsx(_components.code,{children:`true`}),` only when the reference is an attachment (log, PDF, or image) that was uploaded in an earlier turn of the same conversation session and is being surfaced again on a follow-up. Omitted for fresh attachments and knowledge base sources.`]})})]})]}),`\n`,_jsx(ResponseField,{name:`session_id`,type:`string`,id:`param-session-id-1`,children:_jsx(_components.p,{children:`Unique identifier for the conversation session`})}),`\n`,_jsx(ResponseField,{name:`question_url`,type:`string`,id:`param-question-url`,children:_jsx(_components.p,{children:`URL link to open the question on the app`})}),`\n`,_jsx(ResponseField,{name:`can_receive_feedback`,type:`boolean`,id:`param-can-receive-feedback`,children:_jsxs(_components.p,{children:[`Whether the question can receive votes and feedback. Returns `,_jsx(_components.code,{children:`false`}),` for simple interactions and clarifications, `,_jsx(_components.code,{children:`true`}),` for normal answers. See the `,_jsx(_components.a,{href:`/api-reference/endpoints/record-vote`,children:`Record Vote`}),` endpoint for more information on providing feedbacks and votes.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`stream=true`}),`, the response will be a text stream containing only the answer content in chunks, not the full JSON object. The JSON response format shown below applies only when `,_jsx(_components.code,{children:`stream=false`}),` (default).`]})}),`\n`,`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`When the Guru refuses a question, the error response carries a stable `,_jsx(_components.code,{children:`code`}),` field so callers can branch without matching on the wording of `,_jsx(_components.code,{children:`msg`}),`. `,_jsx(_components.code,{children:`QUESTION_NOT_RELATED`}),` means the question falls outside the Guru’s topic; `,_jsx(_components.code,{children:`NOT_ENOUGH_DATA`}),` means the knowledge base did not contain enough context to answer confidently. Branch on `,_jsx(_components.code,{children:`code`}),`, not on `,_jsx(_components.code,{children:`msg`}),`: a Guru can set its own refusal messages, and `,_jsx(_components.code,{children:`msg`}),` then carries that text.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`code-examples`,children:`Code Examples`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Streaming and Fetching`,id:`streaming-and-fetching`,children:[_jsxs(_components.p,{children:[`Stream a response for real-time output, then fetch the completed answer to get metadata like `,_jsx(_components.code,{children:`trust_score`}),`, `,_jsx(_components.code,{children:`references`}),`, and `,_jsx(_components.code,{children:`session_id`}),`.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`66`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`66`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Configuration`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` API_KEY = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'your-api-key-here'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` BASE_URL = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.gurubase.io/api/v1'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` GURU_SLUG = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'your-guru-slug'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Simple stream example`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` askGurubase(question) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Asking question:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, question);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`${BASE_URL}/${GURU_SLUG}/answer/`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` method: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-API-KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: API_KEY,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` body: JSON.stringify({`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` question: question,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stream: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Read stream chunks`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` reader = response.body.getReader();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` decoder = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TextDecoder();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Answer below:\\\\n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { done, value } = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` reader.read();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (done) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`break`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk = decoder.decode(value);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` process.stdout.write(chunk.replace(/\\\\n/g, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`' '`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\\\\n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Fetch existing answer with metadata`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetchExisting(question) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`${BASE_URL}/${GURU_SLUG}/answer/`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` method: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-API-KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: API_KEY,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` body: JSON.stringify({`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` question: question,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stream: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch_existing: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` data = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Answer JSON:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(data);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` data;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Usage`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` question = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Does Gurubase support Slack?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 1. Ask with stream`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` askGurubase(question);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 2. Then fetch the answer from the db (for the JSON fields)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetchExisting(question);`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`Asking With Attachments`,id:`asking-with-attachments`,children:[_jsxs(_components.p,{children:[`Ask a question with image, log, and PDF attachments. Images and PDFs are base64-encoded into `,_jsx(_components.code,{children:`data:\u003cmime>;base64,...`}),` URLs; log files are sent as raw UTF-8 text.`]}),_jsxs(_components.p,{children:[`Fill in the `,_jsx(_components.code,{children:`Config`}),` block, list file paths under `,_jsx(_components.code,{children:`IMAGE_PATHS`}),`, `,_jsx(_components.code,{children:`LOG_PATHS`}),`, and `,_jsx(_components.code,{children:`PDF_PATHS`}),`, then run:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` install requests`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`python`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ask_with_attachments.py`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`ask_with_attachments.py`,numberOfLines:`80`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`80`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` base64`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` mimetypes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sys`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pathlib `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Path`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` typing `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` List`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# ---------- Config ----------`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`BASE_URL = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.gurubase.io/api/v1\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`API_KEY = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-api-key-here\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`GURU_SLUG = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-guru-slug\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`QUESTION = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Summarize the attached files.\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`STREAM = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`False`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# ---------- Attachments (absolute paths) ----------`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`IMAGE_PATHS: List[str] = [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # \"/path/to/screenshot.png\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`LOG_PATHS: List[str] = [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # \"/path/to/app.log\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`PDF_PATHS: List[str] = [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # \"/path/to/doc.pdf\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`def`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` encode_binary(path: Path, fallback_mime: str) -> dict:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` mime = mimetypes.guess_type(path.name)[0] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`or`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fallback_mime`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` b64 = base64.b64encode(path.read_bytes()).decode(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ascii\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"data:{mime};base64,{b64}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: path.name,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: mime,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`def`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` read_log(path: Path) -> dict:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: path.read_text(encoding=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"utf-8\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, errors=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"replace\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: path.name,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`def`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` build_payload() -> dict:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload: dict = {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"question\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: QUESTION, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stream\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: STREAM}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` IMAGE_PATHS:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] = [encode_binary(Path(p), `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image/png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` p `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` IMAGE_PATHS]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LOG_PATHS:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"log_files\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] = [read_log(Path(p)) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` p `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LOG_PATHS]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PDF_PATHS:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pdf_files\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] = [encode_binary(Path(p), `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` p `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PDF_PATHS]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`def`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` main() -> int:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` url = f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{BASE_URL.rstrip('/')}/{GURU_SLUG}/answer/\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers = {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: API_KEY, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload = build_payload()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp = requests.post(url, headers=headers, json=payload, timeout=180, stream=STREAM)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` STREAM:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp.iter_content(chunk_size=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, decode_unicode=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sys.stdout.write(chunk)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sys.stdout.flush()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sys.stdout.write(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\\\\n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 0 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp.ok `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 1`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` print(json.dumps(resp.json(), indent=2, ensure_ascii=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ValueError:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` print(resp.text)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 0 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp.ok `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 1`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` __name__ == `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"__main__\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sys.exit(main())`})}),`\n`]})})}),_jsxs(Note,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`PDFs`}),` are validated upfront: if the request exceeds the Guru’s PDF count or per-file size limit, the endpoint returns HTTP 400 and no answer is generated.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Images`}),` and `,_jsx(_components.strong,{children:`log files`}),` that exceed the Guru’s count or size limits are silently skipped during answering, and the response includes a note stating how many attachments were dropped.`]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Ask Question","icon":"message-circle-question-mark","api":"POST /{guru_slug}/answer/","description":"Ask a question to your Guru","href":"/api-reference/endpoints/ask-question"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,ResponseExample,ResponseField,Tab,Tabs}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Ask a question to your AI-powered Q\u0026A assistant and receive a detailed response with references.`}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`To ask follow-up questions, include the `,_jsx(_components.code,{children:`session_id`}),` from a previous response in your request. This allows the Guru to maintain context of the conversation.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`guru_slug`,type:`string`,required:true,id:`param-guru-slug`,children:_jsx(_components.p,{children:`The slug of the Guru to ask a question to`})}),`\n`,_jsx(Heading,{level:`2`,id:`headers`,children:`Headers`}),`\n`,_jsx(ParamField,{header:`x-api-key`,type:`string`,required:true,id:`param-x-api-key`,children:_jsxs(_components.p,{children:[`Your API key for authentication. You can obtain your API key from the `,_jsx(_components.a,{href:`https://app.gurubase.io/api-keys`,children:`Gurubase dashboard`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`body-parameters`,children:`Body Parameters`}),`\n`,_jsx(ParamField,{body:`question`,type:`string`,required:true,id:`param-question`,children:_jsx(_components.p,{children:`The question to ask your Guru`})}),`\n`,_jsx(ParamField,{body:`stream`,type:`boolean`,default:false,id:`param-stream`,children:_jsx(_components.p,{children:`Whether to stream the response or not. If true, only the content of the response will be returned in chunks.`})}),`\n`,_jsxs(ParamField,{body:`mode`,type:`string`,default:`chat`,id:`param-mode`,children:[_jsx(_components.p,{children:`Selects the answer pipeline for this request. Accepted values:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`chat`}),` (default): the classic single-pass answer pipeline.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`agent`}),`: the autonomous tool loop, which lets the Guru chain `,_jsx(_components.a,{href:`/guides/agents`,children:`Agentic Actions`}),` and other tools before answering.`]}),`\n`]}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`agent`}),` requires an agent-capable Guru (multi-step answers enabled with at least one usable tool). If the Guru does not qualify, the request silently falls back to `,_jsx(_components.code,{children:`chat`}),`. Any unrecognized value is also treated as `,_jsx(_components.code,{children:`chat`}),`.`]})]}),`\n`,_jsx(ParamField,{body:`session_id`,type:`string`,id:`param-session-id`,children:_jsx(_components.p,{children:`Maintain conversation context for follow-up questions. When a question is asked, the response includes a session_id that can be used in subsequent requests. On the Gurubase platform, these conversation sessions are called “Binges”.`})}),`\n`,_jsx(ParamField,{body:`external_user_id`,type:`string`,id:`param-external-user-id`,children:_jsx(_components.p,{children:`External user identifier for tracking user-specific conversation sessions. When provided, this ID is stored in the session. If a session already exists with a different external_user_id, the request will be rejected.`})}),`\n`,_jsxs(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:[_jsx(_components.p,{children:`Optional free-form caller labels attached to the question. The object is stored with the question; it is never injected into the prompt on its own.`}),_jsx(_components.p,{children:`Limits:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Flat object only (no nested objects or arrays); at most 10 keys.`}),`\n`,_jsxs(_components.li,{children:[`Keys are strings up to 64 characters and must match `,_jsx(_components.code,{children:`[A-Za-z0-9_.-]+`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Keys starting with `,_jsx(_components.code,{children:`gurubase_`}),` are reserved and rejected.`]}),`\n`,_jsx(_components.li,{children:`Values must be a string, number, or boolean. String values are limited to 256 characters.`}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`null`}),` values are accepted and dropped from the stored object before persistence (the key is not stored).`]}),`\n`,_jsx(_components.li,{children:`Any other violation returns HTTP 400 before any answer is generated.`}),`\n`]}),_jsxs(_components.p,{children:[`Gurubase can configure a Guru to map a specific metadata key onto a subject inside the stored user profile (contact support to enable it). For example, an `,_jsx(_components.code,{children:`accountId`}),` key can select one account from a profile that covers several, pushed via `,_jsx(_components.a,{href:`/api-reference/endpoints/upsert-profiles`,children:`Upsert Profiles`}),`. When such a mapping is configured on the Guru, sending that key on the request pins the answer to that subject: only that subject’s profile detail is used, memories about other subjects are held back, and identical wording asked about a different subject gets its own answer.`]}),_jsxs(_components.p,{children:[`Subject pinning requires the request to also include the same `,_jsx(_components.code,{children:`external_user_id`}),` used when the profile was pushed via Upsert Profiles; that identifier is how the profile is looked up. Without it no profile is loaded and the mapped metadata key does not pin the answer. Omit the mapped key to answer against the whole profile. An unknown subject id degrades to an unpinned answer rather than failing the request.`]})]}),`\n`,_jsx(ParamField,{body:`fetch_existing`,type:`boolean`,default:false,id:`param-fetch-existing`,children:_jsx(_components.p,{children:`Fetch an existing answer. Do not ask a new question (generally used after streaming to fetch the answer fields like references etc.).`})}),`\n`,_jsx(ParamField,{body:`selected_sources`,type:`number[]`,id:`param-selected-sources`,children:_jsxs(_components.p,{children:[`Optional list of data source IDs to scope the answer to. When provided, retrieval only reads from these sources, so a question like “what did we decide in Monday’s standup” can be pinned to a single transcript instead of the full knowledge base. IDs are the numeric identifiers returned by `,_jsx(_components.a,{href:`/api-reference/endpoints/create-datasources`,children:`Create`}),` / `,_jsx(_components.a,{href:`/api-reference/endpoints/get-datasources`,children:`Get Data Sources`}),` and must belong to the same Guru.`]})}),`\n`,_jsx(ParamField,{body:`selected_labels`,type:`string[]`,id:`param-selected-labels`,children:_jsx(_components.p,{children:`Optional list of data source labels to scope the answer to. Only sources tagged with at least one of the given labels are considered during retrieval.`})}),`\n`,_jsx(ParamField,{body:`use_user_memory`,type:`boolean`,default:true,id:`param-use-user-memory`,children:_jsxs(_components.p,{children:[`Whether the Guru’s `,_jsx(_components.a,{href:`/guides/memory`,children:`End-User Memory`}),` is read from or written to for this request. Set to `,_jsx(_components.code,{children:`false`}),` when a bot or integration is asking on behalf of a user whose profile should not be built up (for example, a meeting assistant asking on a participant’s behalf). Disables both reading and writing for the single request.`]})}),`\n`,_jsxs(ParamField,{body:`images`,type:`array`,id:`param-images`,children:[_jsx(_components.p,{children:`Optional list of image attachments to include with the question. Each item is an object with:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`data`}),` (string): Base64-encoded image as a data URL, formatted as `,_jsx(_components.code,{children:`data:\u003cmime>;base64,\u003cpayload>`}),` (see the `,_jsx(_components.code,{children:`encode_binary`}),` helper in the “Asking With Attachments” example).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`name`}),` (string): File name (e.g. `,_jsx(_components.code,{children:`screenshot.png`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`type`}),` (string): MIME type (e.g. `,_jsx(_components.code,{children:`image/png`}),`).`]}),`\n`]}),_jsx(_components.p,{children:`Item count and per-file size are subject to the Guru’s limits. Images exceeding the limits are silently skipped and the response includes a note with how many were dropped.`})]}),`\n`,_jsxs(ParamField,{body:`log_files`,type:`array`,id:`param-log-files`,children:[_jsx(_components.p,{children:`Optional list of log file attachments to include with the question. Each item is an object with:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`data`}),` (string): Raw UTF-8 log text (see the `,_jsx(_components.code,{children:`read_log`}),` helper in the “Asking With Attachments” example). Not base64-encoded.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`name`}),` (string): File name (e.g. `,_jsx(_components.code,{children:`app.log`}),`).`]}),`\n`]}),_jsx(_components.p,{children:`Item count and per-file size are subject to the Guru’s limits. Log files exceeding the limits are silently skipped and the response includes a note with how many were dropped.`})]}),`\n`,_jsxs(ParamField,{body:`pdf_files`,type:`array`,id:`param-pdf-files`,children:[_jsx(_components.p,{children:`Optional list of PDF attachments to include with the question. Each item is an object with:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`data`}),` (string): Base64-encoded PDF as a data URL, formatted as `,_jsx(_components.code,{children:`data:\u003cmime>;base64,\u003cpayload>`}),` (see the `,_jsx(_components.code,{children:`encode_binary`}),` helper in the “Asking With Attachments” example).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`name`}),` (string): File name (e.g. `,_jsx(_components.code,{children:`doc.pdf`}),`).`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`type`}),` (string): MIME type (typically `,_jsx(_components.code,{children:`application/pdf`}),`).`]}),`\n`]}),_jsx(_components.p,{children:`Item count and per-file size are subject to the Guru’s limits. Unlike images and log files, PDFs are validated upfront: if the request exceeds the limits, the endpoint returns HTTP 400 and no answer is generated.`})]}),`\n`,_jsx(Heading,{level:`3`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`slug`,type:`string`,id:`param-slug`,children:_jsx(_components.p,{children:`Unique identifier for the question-answer pair`})}),`\n`,_jsx(ResponseField,{name:`content`,type:`string`,id:`param-content`,children:_jsx(_components.p,{children:`The answer in Markdown format`})}),`\n`,_jsx(ResponseField,{name:`question`,type:`string`,id:`param-question-1`,children:_jsx(_components.p,{children:`The original question`})}),`\n`,_jsx(ResponseField,{name:`date_updated`,type:`string`,id:`param-date-updated`,children:_jsx(_components.p,{children:`The date when the answer was generated`})}),`\n`,_jsx(ResponseField,{name:`trust_score`,type:`number`,id:`param-trust-score`,children:_jsx(_components.p,{children:`How closely the retrieved sources match the question (0-100). It is not the probability that the answer is correct.`})}),`\n`,_jsxs(ResponseField,{name:`references`,type:`array`,id:`param-references`,children:[_jsx(_components.p,{children:`Array of reference sources used to generate the answer`}),_jsxs(Expandable,{title:`Reference Object`,children:[_jsx(ResponseField,{name:`link`,type:`string`,id:`param-link`,children:_jsx(_components.p,{children:`URL of the reference`})}),_jsx(ResponseField,{name:`icon`,type:`string`,id:`param-icon`,children:_jsx(_components.p,{children:`Icon URL for the reference source`})}),_jsx(ResponseField,{name:`title`,type:`string`,id:`param-title`,children:_jsx(_components.p,{children:`Title of the reference`})}),_jsx(ResponseField,{name:`inherited`,type:`boolean`,id:`param-inherited`,children:_jsxs(_components.p,{children:[`Present and `,_jsx(_components.code,{children:`true`}),` only when the reference is an attachment (log, PDF, or image) that was uploaded in an earlier turn of the same conversation session and is being surfaced again on a follow-up. Omitted for fresh attachments and knowledge base sources.`]})})]})]}),`\n`,_jsx(ResponseField,{name:`session_id`,type:`string`,id:`param-session-id-1`,children:_jsx(_components.p,{children:`Unique identifier for the conversation session`})}),`\n`,_jsx(ResponseField,{name:`question_url`,type:`string`,id:`param-question-url`,children:_jsx(_components.p,{children:`URL link to open the question on the app`})}),`\n`,_jsx(ResponseField,{name:`can_receive_feedback`,type:`boolean`,id:`param-can-receive-feedback`,children:_jsxs(_components.p,{children:[`Whether the question can receive votes and feedback. Returns `,_jsx(_components.code,{children:`false`}),` for simple interactions and clarifications, `,_jsx(_components.code,{children:`true`}),` for normal answers. See the `,_jsx(_components.a,{href:`/api-reference/endpoints/record-vote`,children:`Record Vote`}),` endpoint for more information on providing feedbacks and votes.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`When `,_jsx(_components.code,{children:`stream=true`}),`, the response will be a text stream containing only the answer content in chunks, not the full JSON object. The JSON response format shown below applies only when `,_jsx(_components.code,{children:`stream=false`}),` (default).`]})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200`,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"slug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"is-slack-supported-on-anteon-5fdf19ad-de4c-4f07-9dff-0fe1003dccac\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"# Is Slack supported on Anteon?`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\n\\\\n`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`**Yes, Slack is supported on Anteon.** You can integrate Slack to receive notifications about anomalies in your Kubernetes cluster. This integration is available for Anteon Cloud and the Self-Hosted Enterprise Edition. For the Self-Hosted version, you need to create a Slack application and configure it with specific OAuth scopes. Once set up, you can receive alerts directly in your Slack channels. For detailed instructions, refer to the [Slack Integration Guide](https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/).\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"question\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Is Slack supported on Anteon?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"date_updated\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"22 January 2025\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"trust_score\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`76`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"references\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"link\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"icon\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://getanteon.com/img/favicon.ico\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"title\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"📧 Slack Integration | Anteon\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"session_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3cdbdc4c-023f-45ce-832f-f1881b4f238b\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"question_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://app.gurubase.io/g/gurubase/is-slack-supported-on-anteon-5fdf19ad-de4c-4f07-9dff-0fe1003dccac\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"can_receive_feedback\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `})}),`\n`]})})}),_jsx(CodeBlock,{filename:`200 (stream=true)`,numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`# Is Slack supported on Anteon?`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`**Yes, Slack is supported on Anteon.** You can integrate Slack to receive notifications about anomalies in your Kubernetes cluster. This integration is available for Anteon Cloud and the Self-Hosted Enterprise Edition. For the Self-Hosted version, you need to create a Slack application and configure it with specific OAuth scopes. Once set up, you can receive alerts directly in your Slack channels. For detailed instructions, refer to the [Slack Integration Guide](https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/).`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(CodeBlock,{filename:`400`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"msg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cerror message>\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} `})}),`\n`]})})}),_jsx(CodeBlock,{filename:`401`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"msg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Invalid API key\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`429`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"msg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Request was throttled. Expected available in 56 seconds.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"msg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"External user ID mismatch for this session. Code: S-902\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"msg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"This question is not related to \u003cGuru name>.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"QUESTION_NOT_RELATED\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400`,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"msg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003cGuru name> Guru doesn't have enough data as a source to generate a reliable answer for this question.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"NOT_ENOUGH_DATA\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`When the Guru refuses a question, the error response carries a stable `,_jsx(_components.code,{children:`code`}),` field so callers can branch without matching on the wording of `,_jsx(_components.code,{children:`msg`}),`. `,_jsx(_components.code,{children:`QUESTION_NOT_RELATED`}),` means the question falls outside the Guru’s topic; `,_jsx(_components.code,{children:`NOT_ENOUGH_DATA`}),` means the knowledge base did not contain enough context to answer confidently. Branch on `,_jsx(_components.code,{children:`code`}),`, not on `,_jsx(_components.code,{children:`msg`}),`: a Guru can set its own refusal messages, and `,_jsx(_components.code,{children:`msg`}),` then carries that text.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`code-examples`,children:`Code Examples`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Streaming and Fetching`,id:`streaming-and-fetching`,children:[_jsxs(_components.p,{children:[`Stream a response for real-time output, then fetch the completed answer to get metadata like `,_jsx(_components.code,{children:`trust_score`}),`, `,_jsx(_components.code,{children:`references`}),`, and `,_jsx(_components.code,{children:`session_id`}),`.`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`66`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`66`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Configuration`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` API_KEY = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'your-api-key-here'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` BASE_URL = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'https://api.gurubase.io/api/v1'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` GURU_SLUG = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'your-guru-slug'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Simple stream example`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` askGurubase(question) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Asking question:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, question);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`${BASE_URL}/${GURU_SLUG}/answer/`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` method: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-API-KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: API_KEY,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` body: JSON.stringify({`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` question: question,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stream: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Read stream chunks`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` reader = response.body.getReader();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` decoder = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` TextDecoder();`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Answer below:\\\\n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` while`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { done, value } = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` reader.read();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (done) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`break`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk = decoder.decode(value);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` process.stdout.write(chunk.replace(/\\\\n/g, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`' '`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`));`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\\\\n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Fetch existing answer with metadata`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetchExisting(question) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`${BASE_URL}/${GURU_SLUG}/answer/`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` method: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers: {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'X-API-KEY'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: API_KEY,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` body: JSON.stringify({`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` question: question,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stream: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`false`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetch_existing: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` data = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'Answer JSON:'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` console.log(data);`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` data;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Usage`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` question = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Does Gurubase support Slack?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 1. Ask with stream`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` askGurubase(question);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// 2. Then fetch the answer from the db (for the JSON fields)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fetchExisting(question);`})]}),`\n`]})})})]}),_jsxs(Tab,{title:`Asking With Attachments`,id:`asking-with-attachments`,children:[_jsxs(_components.p,{children:[`Ask a question with image, log, and PDF attachments. Images and PDFs are base64-encoded into `,_jsx(_components.code,{children:`data:\u003cmime>;base64,...`}),` URLs; log files are sent as raw UTF-8 text.`]}),_jsxs(_components.p,{children:[`Fill in the `,_jsx(_components.code,{children:`Config`}),` block, list file paths under `,_jsx(_components.code,{children:`IMAGE_PATHS`}),`, `,_jsx(_components.code,{children:`LOG_PATHS`}),`, and `,_jsx(_components.code,{children:`PDF_PATHS`}),`, then run:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` install requests`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`python`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ask_with_attachments.py`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`ask_with_attachments.py`,numberOfLines:`80`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`80`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` base64`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` mimetypes`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sys`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` pathlib `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Path`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` typing `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` List`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# ---------- Config ----------`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`BASE_URL = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api.gurubase.io/api/v1\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`API_KEY = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-api-key-here\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`GURU_SLUG = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"your-guru-slug\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`QUESTION = `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Summarize the attached files.\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`STREAM = `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`False`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# ---------- Attachments (absolute paths) ----------`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`IMAGE_PATHS: List[str] = [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # \"/path/to/screenshot.png\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`LOG_PATHS: List[str] = [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # \"/path/to/app.log\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`PDF_PATHS: List[str] = [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # \"/path/to/doc.pdf\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`def`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` encode_binary(path: Path, fallback_mime: str) -> dict:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` mime = mimetypes.guess_type(path.name)[0] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`or`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` fallback_mime`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` b64 = base64.b64encode(path.read_bytes()).decode(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ascii\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"data:{mime};base64,{b64}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: path.name,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: mime,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`def`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` read_log(path: Path) -> dict:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: path.read_text(encoding=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"utf-8\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, errors=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"replace\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: path.name,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`def`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` build_payload() -> dict:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload: dict = {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"question\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: QUESTION, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stream\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: STREAM}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` IMAGE_PATHS:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"images\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] = [encode_binary(Path(p), `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image/png\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` p `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` IMAGE_PATHS]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LOG_PATHS:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"log_files\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] = [read_log(Path(p)) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` p `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` LOG_PATHS]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PDF_PATHS:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"pdf_files\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] = [encode_binary(Path(p), `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` p `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PDF_PATHS]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`def`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` main() -> int:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` url = f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{BASE_URL.rstrip('/')}/{GURU_SLUG}/answer/\"`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` headers = {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"x-api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: API_KEY, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` payload = build_payload()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp = requests.post(url, headers=headers, json=payload, timeout=180, stream=STREAM)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` STREAM:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp.iter_content(chunk_size=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, decode_unicode=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`True`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`):`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sys.stdout.write(chunk)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sys.stdout.flush()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sys.stdout.write(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\\\\n\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 0 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp.ok `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 1`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` print(json.dumps(resp.json(), indent=2, ensure_ascii=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`False`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` except`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ValueError:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` print(resp.text)`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 0 `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` resp.ok `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` 1`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` __name__ == `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"__main__\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` sys.exit(main())`})}),`\n`]})})}),_jsxs(Note,{children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`PDFs`}),` are validated upfront: if the request exceeds the Guru’s PDF count or per-file size limit, the endpoint returns HTTP 400 and no answer is generated.`]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Images`}),` and `,_jsx(_components.strong,{children:`log files`}),` that exceed the Guru’s count or size limits are silently skipped during answering, and the response includes a note stating how many attachments were dropped.`]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Ask Question","icon":"message-circle-question-mark","api":"POST /{guru_slug}/answer/","description":"Ask a question to your Guru","href":"/api-reference/endpoints/ask-question"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Path Parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Headers","slug":"headers","depth":2,"children":[{"title":"Body Parameters","slug":"body-parameters","depth":3,"children":[]},{"title":"Response","slug":"response","depth":3,"children":[]}]},{"title":"Code Examples","slug":"code-examples","depth":2,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"slug\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"is-slack-supported-on-anteon-5fdf19ad-de4c-4f07-9dff-0fe1003dccac\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"content\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"# Is Slack supported on Anteon?\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\">\\n\\n\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">**Yes, Slack is supported on Anteon.** You can integrate Slack to receive notifications about anomalies in your Kubernetes cluster. This integration is available for Anteon Cloud and the Self-Hosted Enterprise Edition. For the Self-Hosted version, you need to create a Slack application and configure it with specific OAuth scopes. Once set up, you can receive alerts directly in your Slack channels. For detailed instructions, refer to the [Slack Integration Guide](https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/).\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"question\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Is Slack supported on Anteon?\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"date_updated\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"22 January 2025\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"trust_score\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">76\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"references\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"link\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"icon\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://getanteon.com/img/favicon.ico\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"title\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"📧 Slack Integration | Anteon\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"session_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"3cdbdc4c-023f-45ce-832f-f1881b4f238b\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"question_url\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://app.gurubase.io/g/gurubase/is-slack-supported-on-anteon-5fdf19ad-de4c-4f07-9dff-0fe1003dccac\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"can_receive_feedback\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">} \u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"200 (stream=true)","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"text\">\u003ccode language=\"text\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan># Is Slack supported on Anteon?\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan>\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan>**Yes, Slack is supported on Anteon.** You can integrate Slack to receive notifications about anomalies in your Kubernetes cluster. This integration is available for Anteon Cloud and the Self-Hosted Enterprise Edition. For the Self-Hosted version, you need to create a Slack application and configure it with specific OAuth scopes. Once set up, you can receive alerts directly in your Slack channels. For detailed instructions, refer to the [Slack Integration Guide](https://getanteon.com/docs/self-hosted/self-hosted-slack-integration/).\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan>\u003c/span>\u003c/span>\u003c/code>\u003c/pre>"},{"filename":"400","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"msg\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u0026#x3C;error message>\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">} \u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"401","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"msg\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Invalid API key\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"429","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"msg\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Request was throttled. Expected available in 56 seconds.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"msg\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"External user ID mismatch for this session. Code: S-902\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"msg\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"This question is not related to \u0026#x3C;Guru name>.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"QUESTION_NOT_RELATED\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"msg\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u0026#x3C;Guru name> Guru doesn't have enough data as a source to generate a reliable answer for this question.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"code\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"NOT_ENOUGH_DATA\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Ask Question","path":"/{guru_slug}/answer/","servers":[{"url":"https://api.gurubase.io/api/v1/"}],"method":"post","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"x-api-key":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{"x-api-key":{"schema":[{"type":"string","description":"Your API key for authentication. You can obtain your API key from the Gurubase dashboard .","required":true}]}},"cookie":{},"path":{"guru_slug":{"schema":[{"type":"string","description":"The slug of the Guru to ask a question to","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"question":[{"type":"string","description":"The question to ask your Guru","required":true}],"stream":[{"type":"boolean","description":"Whether to stream the response or not. If true, only the content of the response will be returned in chunks."}],"mode":[{"type":"string","description":"Selects the answer pipeline for this request. Accepted values: `chat` (default): the classic single-pass answer pipeline. `agent` : the autonomous tool loop, which lets the Guru chain Agentic Actions and other tools before answering. `agent` requires an agent-capable Guru (multi-step answers enabled with at least one usable tool). If the Guru does not qualify, the request silently falls back to `chat` . Any unrecognized value is also treated as `chat` ."}],"session_id":[{"type":"string","description":"Maintain conversation context for follow-up questions. When a question is asked, the response includes a session_id that can be used in subsequent requests. On the Gurubase platform, these conversation sessions are called “Binges”."}],"external_user_id":[{"type":"string","description":"External user identifier for tracking user-specific conversation sessions. When provided, this ID is stored in the session. If a session already exists with a different external_user_id, the request will be rejected."}],"metadata":[{"type":"object","properties":{},"description":"Optional free-form caller labels attached to the question. The object is stored with the question; it is never injected into the prompt on its own. Limits: Flat object only (no nested objects or arrays); at most 10 keys. Keys are strings up to 64 characters and must match `[A-Za-z0-9_.-]+` . Keys starting with `gurubase_` are reserved and rejected. Values must be a string, number, or boolean. String values are limited to 256 characters. `null` values are accepted and dropped from the stored object before persistence (the key is not stored). Any other violation returns HTTP 400 before any answer is generated. Gurubase can configure a Guru to map a specific metadata key onto a subject inside the stored user profile (contact support to enable it). For example, an `accountId` key can select one account from a profile that covers several, pushed via Upsert Profiles . When such a mapping is configured on the Guru, sending that key on the request pins the answer to that subject: only that subject’s profile detail is used, memories about other subjects are held back, and identical wording asked about a different subject gets its own answer. Subject pinning requires the request to also include the same `external_user_id` used when the profile was pushed via Upsert Profiles; that identifier is how the profile is looked up. Without it no profile is loaded and the mapped metadata key does not pin the answer. Omit the mapped key to answer against the whole profile. An unknown subject id degrades to an unpinned answer rather than failing the request."}],"fetch_existing":[{"type":"boolean","description":"Fetch an existing answer. Do not ask a new question (generally used after streaming to fetch the answer fields like references etc.)."}],"selected_sources":[{"type":"array","items":[{"type":"number"}],"description":"Optional list of data source IDs to scope the answer to. When provided, retrieval only reads from these sources, so a question like “what did we decide in Monday’s standup” can be pinned to a single transcript instead of the full knowledge base. IDs are the numeric identifiers returned by Create / Get Data Sources and must belong to the same Guru."}],"selected_labels":[{"type":"array","items":[{"type":"string"}],"description":"Optional list of data source labels to scope the answer to. Only sources tagged with at least one of the given labels are considered during retrieval."}],"use_user_memory":[{"type":"boolean","description":"Whether the Guru’s End-User Memory is read from or written to for this request. Set to `false` when a bot or integration is asking on behalf of a user whose profile should not be built up (for example, a meeting assistant asking on a participant’s behalf). Disables both reading and writing for the single request."}],"images":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Optional list of image attachments to include with the question. Each item is an object with: `data` (string): Base64-encoded image as a data URL, formatted as `data:\u003cmime>;base64,\u003cpayload>` (see the `encode_binary` helper in the “Asking With Attachments” example). `name` (string): File name (e.g. `screenshot.png` ). `type` (string): MIME type (e.g. `image/png` ). Item count and per-file size are subject to the Guru’s limits. Images exceeding the limits are silently skipped and the response includes a note with how many were dropped."}],"log_files":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Optional list of log file attachments to include with the question. Each item is an object with: `data` (string): Raw UTF-8 log text (see the `read_log` helper in the “Asking With Attachments” example). Not base64-encoded. `name` (string): File name (e.g. `app.log` ). Item count and per-file size are subject to the Guru’s limits. Log files exceeding the limits are silently skipped and the response includes a note with how many were dropped."}],"pdf_files":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Optional list of PDF attachments to include with the question. Each item is an object with: `data` (string): Base64-encoded PDF as a data URL, formatted as `data:\u003cmime>;base64,\u003cpayload>` (see the `encode_binary` helper in the “Asking With Attachments” example). `name` (string): File name (e.g. `doc.pdf` ). `type` (string): MIME type (typically `application/pdf` ). Item count and per-file size are subject to the Guru’s limits. Unlike images and log files, PDFs are validated upfront: if the request exceeds the limits, the endpoint returns HTTP 400 and no answer is generated."}]}}],"examples":{"example":{"value":{"question":"\u003cstring>","stream":true,"mode":"\u003cstring>","session_id":"\u003cstring>","external_user_id":"\u003cstring>","metadata":{},"fetch_existing":true,"selected_sources":[123],"selected_labels":["\u003cstring>"],"use_user_memory":true,"images":[{}],"log_files":[{}],"pdf_files":[{}]}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"slug":[{"type":"string","description":"Unique identifier for the question-answer pair"}],"content":[{"type":"string","description":"The answer in Markdown format"}],"question":[{"type":"string","description":"The original question"}],"date_updated":[{"type":"string","description":"The date when the answer was generated"}],"trust_score":[{"type":"number","description":"How closely the retrieved sources match the question (0-100). It is not the probability that the answer is correct."}],"references":[{"type":"array","items":[{"type":"object","properties":{"link":[{"type":"string","description":"URL of the reference"}],"icon":[{"type":"string","description":"Icon URL for the reference source"}],"title":[{"type":"string","description":"Title of the reference"}],"inherited":[{"type":"boolean","description":"Present and `true` only when the reference is an attachment (log, PDF, or image) that was uploaded in an earlier turn of the same conversation session and is being surfaced again on a follow-up. Omitted for fresh attachments and knowledge base sources."}]}}],"description":"Array of reference sources used to generate the answer"}],"session_id":[{"type":"string","description":"Unique identifier for the conversation session"}],"question_url":[{"type":"string","description":"URL link to open the question on the app"}],"can_receive_feedback":[{"type":"boolean","description":"Whether the question can receive votes and feedback. Returns `false` for simple interactions and clarifications, `true` for normal answers. See the Record Vote endpoint for more information on providing feedbacks and votes."}]}}],"examples":{"example":{"value":{"slug":"\u003cstring>","content":"\u003cstring>","question":"\u003cstring>","date_updated":"\u003cstring>","trust_score":123,"references":[{"link":"\u003cstring>","icon":"\u003cstring>","title":"\u003cstring>","inherited":true}],"session_id":"\u003cstring>","question_url":"\u003cstring>","can_receive_feedback":true}}}}}},"deprecated":false}},"jsLinks":["/_mintlify/custom/gurubase/12071eb9505de623/gurubase.js"],"subdomain":"gurubase","siteName":"Gurubase","title":"Ask Question - Gurubase","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-09T12:11:50.821Z","originalFileLocation":"api-reference/endpoints/ask-question.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=\"description\" content=\"Ask a question to your Guru\">\u003cmeta data-mint-head name=\"keywords\" content=\"AI agents, hallucination-resistant AI, RAG, trust score, citations, agentic actions, MCP, MCP server, MCP client, on-premise AI, enterprise AI, knowledge base, documentation\">\u003cmeta data-mint-head name=\"application-name\" content=\"Gurubase\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/gurubase/VZQ0YRO71cVM_Oe2/_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/gurubase/VZQ0YRO71cVM_Oe2/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/gurubase/VZQ0YRO71cVM_Oe2/_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/gurubase/VZQ0YRO71cVM_Oe2/_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/gurubase/VZQ0YRO71cVM_Oe2/_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/gurubase/VZQ0YRO71cVM_Oe2/_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/gurubase/VZQ0YRO71cVM_Oe2/_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/gurubase/VZQ0YRO71cVM_Oe2/_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/gurubase/VZQ0YRO71cVM_Oe2/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Ask Question - Gurubase\">\u003cmeta data-mint-head property=\"og:description\" content=\"Ask a question to your Guru\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Gurubase Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.gurubase.ai/api-reference/endpoints/ask-question\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://gurubase.mintlify.site/_mintlify/api/og/v2?division=Endpoints\u0026amp;title=Ask+Question\u0026amp;description=Ask+a+question+to+your+Guru\u0026amp;theme=735e7d9e0107f50211ecece0\u0026amp;signature=e6bedc336a653d746d44323d00c2abe83e5eabf0b3be0fb0bac198dea54c7a95\">\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=\"Ask Question - Gurubase\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Ask a question to your Guru\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://gurubase.mintlify.site/_mintlify/api/og/v2?division=Endpoints\u0026amp;title=Ask+Question\u0026amp;description=Ask+a+question+to+your+Guru\u0026amp;theme=735e7d9e0107f50211ecece0\u0026amp;signature=e6bedc336a653d746d44323d00c2abe83e5eabf0b3be0fb0bac198dea54c7a95\">\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/gurubase/VZQ0YRO71cVM_Oe2/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Gurubase\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#006BFF\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"author\" content=\"Gurubase\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.gurubase.ai/api-reference/endpoints/ask-question\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoints/ask-question.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.gurubase.ai/#organization\",\"name\":\"Gurubase\",\"url\":\"https://docs.gurubase.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/gurubase/0kE9Hd9k_SJDKu8Q/logo/light.svg?fit=max\u0026auto=format\u0026n=0kE9Hd9k_SJDKu8Q\u0026q=85\u0026s=e80be9ea5250513afdd5cac9e9cf40eb\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.gurubase.ai#website\",\"name\":\"Gurubase\",\"url\":\"https://docs.gurubase.ai\",\"publisher\":{\"@id\":\"https://docs.gurubase.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.gurubase.ai/api-reference/endpoints/ask-question#webpage\",\"url\":\"https://docs.gurubase.ai/api-reference/endpoints/ask-question\",\"name\":\"Ask Question\",\"description\":\"Ask a question to your Guru\",\"dateModified\":\"2026-11-09T12:11:50.821Z\",\"isPartOf\":{\"@id\":\"https://docs.gurubase.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.gurubase.ai/api-reference/endpoints/ask-question#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.gurubase.ai/api-reference/endpoints/ask-question#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Gurubase\",\"item\":\"https://docs.gurubase.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Ask Question\",\"item\":\"https://docs.gurubase.ai/api-reference/endpoints/ask-question\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.gurubase.ai/api-reference/endpoints/ask-question#apireference\",\"headline\":\"Ask Question\",\"name\":\"Ask Question\",\"description\":\"Ask a question to your Guru\",\"url\":\"https://docs.gurubase.ai/api-reference/endpoints/ask-question\",\"mainEntityOfPage\":{\"@id\":\"https://docs.gurubase.ai/api-reference/endpoints/ask-question#webpage\"},\"dateModified\":\"2026-11-09T12:11:50.821Z\",\"publisher\":{\"@id\":\"https://docs.gurubase.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.gurubase.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Gurubase\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Gurubase\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoints/ask-question.md","siteName":"Gurubase","nav":{"global":{"anchors":[{"anchor":"Try Gurubase","icon":"sparkles","href":"https://gurubase.io/"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","groups":[{"group":"API Documentation","icon":"book-text","pages":[{"title":"API Reference","icon":"book-open","href":"/api-reference/introduction"},{"title":"Authentication","icon":"key","description":"Learn how to authenticate your Gurubase API requests","href":"/api-reference/authentication"}]},{"group":"Endpoints","icon":"route","pages":[{"title":"Ask Question","icon":"message-circle-question-mark","api":"POST /{guru_slug}/answer/","href":"/api-reference/endpoints/ask-question"},{"title":"Answer Progress","icon":"activity","api":"GET /{guru_slug}/answer-progress/","description":"Read the live progress line for an in-flight answer","href":"/api-reference/endpoints/answer-progress"},{"title":"Create Data Sources","icon":"folder-plus","api":"POST /{guru_slug}/data-sources/","href":"/api-reference/endpoints/create-datasources"},{"title":"Get Data Sources","icon":"folder","api":"GET /{guru_slug}/data-sources/","href":"/api-reference/endpoints/get-datasources"},{"title":"Delete Data Sources","icon":"trash-2","api":"DELETE /{guru_slug}/data-sources/","href":"/api-reference/endpoints/delete-datasources"},{"title":"Reindex Data Sources","icon":"refresh-cw","api":"POST /{guru_slug}/data-sources/reindex/","href":"/api-reference/endpoints/reindex-datasources"},{"title":"Start Website Crawl","icon":"play","api":"POST /{guru_slug}/crawl/start/","href":"/api-reference/endpoints/crawler-start"},{"title":"Stop Website Crawl","icon":"circle-stop","api":"POST /{guru_slug}/crawl/{crawl_id}/stop/","href":"/api-reference/endpoints/crawler-stop"},{"title":"Get Crawl Status","icon":"activity","api":"GET /{guru_slug}/crawl/{crawl_id}/status/","href":"/api-reference/endpoints/crawler-status"},{"title":"Import YouTube Channel","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gurubase/logo/brands/youtube.svg","api":"POST /youtube/channel/","href":"/api-reference/endpoints/import-youtube-channel"},{"title":"Import YouTube Playlist","icon":"https://mintlify.s3.us-west-1.amazonaws.com/gurubase/logo/brands/youtube.svg","api":"POST /youtube/playlist/","href":"/api-reference/endpoints/import-youtube-playlist"},{"title":"Export Analytics Data","icon":"download","api":"POST /{guru_slug}/analytics/export/","href":"/api-reference/endpoints/analytics-export"},{"title":"Record Vote","icon":"thumbs-up","api":"POST /{guru_type}/record_vote/","href":"/api-reference/endpoints/record-vote"},{"title":"Semantic Search","icon":"search","api":"POST /{guru_slug}/semantic-search/","href":"/api-reference/endpoints/semantic-search"},{"title":"Transcribe Audio","icon":"audio-lines","api":"POST /{guru_type}/transcribe/","href":"/api-reference/endpoints/transcribe-audio"},{"title":"Text-to-Speech Stream","icon":"volume-2","api":"POST /{guru_type}/text-to-speech/stream/","href":"/api-reference/endpoints/text-to-speech"},{"title":"Text-to-Speech Stream V2","icon":"volume-2","api":"POST /{guru_type}/text-to-speech-v2/stream/","href":"/api-reference/endpoints/text-to-speech-v2"},{"title":"List Sessions","icon":"list","api":"POST /{guru_slug}/sessions/","href":"/api-reference/endpoints/list-sessions"},{"title":"Get Session","icon":"eye","api":"POST /sessions/{session_id}/conversation/","href":"/api-reference/endpoints/get-session"},{"title":"Delete Session","icon":"trash-2","api":"DELETE /sessions/{session_id}/delete/","href":"/api-reference/endpoints/delete-session"},{"title":"Get End-User Data","icon":"shield-user","api":"GET /{guru_slug}/end-users/{external_user_id}/data/","href":"/api-reference/endpoints/end-user-data"},{"title":"Erase End-User Data","icon":"shield-x","api":"DELETE /{guru_slug}/end-users/{external_user_id}/data/","href":"/api-reference/endpoints/erase-end-user-data"},{"title":"Follow-up Examples","icon":"message-square-plus","api":"POST /{guru_type}/follow-up/examples/","href":"/api-reference/endpoints/follow-up-examples"},{"title":"Upsert User Profiles","icon":"user-pen","api":"POST /{guru_slug}/profiles/","href":"/api-reference/endpoints/upsert-profiles"}]}]}]},"basePath":"","title":"Ask Question - Gurubase","buildId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","deploymentId":"dpl_8hoxaqFTU7hTr6A2fUraxAyjuiZo","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-CDiBsYGW.js","utils-KF9rPlmF.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C26urKTX.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BdjmJAC1.js","snippetPresets-3IpDBjt3.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-D4x_2vvo.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BIWdc5Pa.js","shallow-LQqfiMNd.js","getApiPlaygroundDisplay-DryzlOZG.js","CodeSnippet-tcJujU4r.js","CodeSnippets-BHp0nVLL.js","Page-1CZdsdAn.js","getPastedJson-DU-1ayUv.js","icon-CZK2hPr4.js","MethodPill-DOaqmTFC.js","DuplicateIcon-B5-nUxxl.js","createIcon-CDP_U77G.js","DynamicMarkdown-GHvayGOn.js","SectionHeading-BYvpkmUD.js","axios-vUo_bRtp.js"]}