Skip to main content

ai_chat_context_presets

Creates, updates, deletes, gets or lists an ai_chat_context_presets resource.

Overview​

Nameai_chat_context_presets
TypeResource
Idgitlab.duo.ai_chat_context_presets

Fields​

The following fields are returned by SELECT queries:

GraphQL response envelope

NameDatatypeDescription
ai_resource_datastringSerialized representation of the AI resource in the current context.
questionsarray

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselecthostproject_id, question_count, resource_id, urlGet available GitLab Duo Chat context presets for the current user for a specific URL Generated from the GitLab GraphQL schema field Query.aiChatContextPresets (ContextPreset).

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
hoststringGitLab host, with an optional port (default gitlab.com). Resolved from the GITLAB_HOST environment variable when it is set (x-stackQL-envVar); a WHERE host value always takes precedence. Self-managed instances: the provider is generated from the gitlab.com schema, so older instances may reject fields they do not serve. (default: gitlab.com, x-stackQL-envVar: GITLAB_HOST)
project_idstringGlobal ID of the project the user is acting on.
question_countintegerNumber of questions for the default screen.
resource_idstringGlobal ID of the resource from the current page.
urlstringURL of the page the user is currently on.

SELECT examples​

Get available GitLab Duo Chat context presets for the current user for a specific URL Generated from the GitLab GraphQL schema field Query.aiChatContextPresets (ContextPreset).

SELECT
ai_resource_data,
questions
FROM gitlab.duo.ai_chat_context_presets
WHERE host = '{{ host }}' -- required (defaults to gitlab.com; or set GITLAB_HOST)
AND project_id = '{{ project_id }}'
AND question_count = '{{ question_count }}'
AND resource_id = '{{ resource_id }}'
AND url = '{{ url }}'
;