Skip to main content

namespace_instance_chat_completions

Creates, updates, deletes, gets or lists a namespace_instance_chat_completions resource.

Overview

Namenamespace_instance_chat_completions
TypeResource
Idcloudflare.aisearch.namespace_instance_chat_completions

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
chat_completions_by_accountinsertid, account_id, name, messagesPerforms a chat completion request against an AI Search instance, using indexed content as context for generating responses.

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
account_idstringThe Cloudflare account ID.
idstringResource ID.
namestringResource name.

INSERT examples

Performs a chat completion request against an AI Search instance, using indexed content as context for generating responses.

INSERT INTO cloudflare.aisearch.namespace_instance_chat_completions (
ai_search_options,
messages,
model,
stream,
id,
account_id,
name
)
SELECT
'{{ ai_search_options }}',
'{{ messages }}' /* required */,
'{{ model }}',
{{ stream }},
'{{ id }}',
'{{ account_id }}',
'{{ name }}'
RETURNING
id,
choices,
chunks,
model,
object
;