ai_chat_context_presets
Creates, updates, deletes, gets or lists an ai_chat_context_presets resource.
Overview​
| Name | ai_chat_context_presets |
| Type | Resource |
| Id | gitlab.duo.ai_chat_context_presets |
Fields​
The following fields are returned by SELECT queries:
- get
GraphQL response envelope
| Name | Datatype | Description |
|---|---|---|
ai_resource_data | string | Serialized representation of the AI resource in the current context. |
questions | array |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | host | project_id, question_count, resource_id, url | 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). |
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.
| Name | Datatype | Description |
|---|---|---|
host | string | GitLab 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_id | string | Global ID of the project the user is acting on. |
question_count | integer | Number of questions for the default screen. |
resource_id | string | Global ID of the resource from the current page. |
url | string | URL of the page the user is currently on. |
SELECT examples​
- get
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 }}'
;