Vertex chat and Conversation Engine Chat type
To get more information about ChatEngine, see:
resource "google_discovery_engine_data_store" "test_data_store" {
location = "global"
data_store_id = "data-store"
display_name = "Structured datastore"
industry_vertical = "GENERIC"
content_config = "NO_CONTENT"
solution_types = ["SOLUTION_TYPE_CHAT"]
}
resource "google_discovery_engine_data_store" "test_data_store_2" {
location = google_discovery_engine_data_store.test_data_store.location
data_store_id = "data-store-2"
display_name = "Structured datastore 2"
industry_vertical = "GENERIC"
content_config = "NO_CONTENT"
solution_types = ["SOLUTION_TYPE_CHAT"]
}
resource "google_discovery_engine_chat_engine" "primary" {
engine_id = "chat-engine-id"
collection_id = "default_collection"
location = google_discovery_engine_data_store.test_data_store.location
display_name = "Chat engine"
industry_vertical = "GENERIC"
data_store_ids = [google_discovery_engine_data_store.test_data_store.data_store_id, google_discovery_engine_data_store.test_data_store_2.data_store_id]
common_config {
company_name = "test-company"
}
chat_engine_config {
agent_creation_config {
business = "test business name"
default_language_code = "en"
time_zone = "America/Los_Angeles"
}
}
}
The following arguments are supported:
display_name
-
(Required)
The display name of the engine. Should be human readable. UTF-8 encoded string with limit of 1024 characters.
data_store_ids
-
(Required)
The data stores associated with this engine. Multiple DataStores in the same Collection can be associated here. All listed DataStores must be SOLUTION_TYPE_CHAT
. Adding or removing data stores will force recreation.
chat_engine_config
-
(Required)
Configurations for a chat Engine.
Structure is documented below.
engine_id
-
(Required)
The ID to use for chat engine.
collection_id
-
(Required)
The collection ID.
location
-
(Required)
Location.
The chat_engine_config
block supports:
agent_creation_config
-
(Required)
The configuration to generate the Dialogflow agent that is associated to this Engine.
Structure is documented below.The agent_creation_config
block supports:
business
-
(Optional)
Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.
default_language_code
-
(Required)
The default language of the agent as a language tag. See Language Support for a list of the currently supported language codes.
time_zone
-
(Required)
The time zone of the agent from the time zone database, e.g., America/New_York, Europe/Paris.
location
-
(Optional)
Agent location for Agent creation, currently supported values: global/us/eu, it needs to be the same region as the Chat Engine.
industry_vertical
-
(Optional)
The industry vertical that the chat engine registers. Vertical on Engine has to match vertical of the DataStore linked to the engine.
Default value is GENERIC
.
Possible values are: GENERIC
.
common_config
-
(Optional)
Common config spec that specifies the metadata of the engine.
Structure is documented below.
project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
The common_config
block supports:
company_name
-
(Optional)
The name of the company, business or entity that is associated with the engine. Setting this may help improve LLM related features.In addition to the arguments listed above, the following computed attributes are exported:
id
- an identifier for the resource with format projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}
name
-
The unique full resource name of the chat engine. Values are of the format
projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}
.
This field must be a UTF-8 encoded string with a length limit of 1024
characters.
create_time
-
Timestamp the Engine was created at.
update_time
-
Timestamp the Engine was last updated.
chat_engine_metadata
-
Additional information of the Chat Engine.
Structure is documented below.
The chat_engine_metadata
block contains:
dialogflow_agent
-
(Output)
The resource name of a Dialogflow agent, that this Chat Engine refers to.This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.ChatEngine can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}
{{project}}/{{location}}/{{collection_id}}/{{engine_id}}
{{location}}/{{collection_id}}/{{engine_id}}
In Terraform v1.5.0 and later, use an import
block to import ChatEngine using one of the formats above. For example:
import {
id = "projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}"
to = google_discovery_engine_chat_engine.default
}
When using the terraform import
command, ChatEngine can be imported using one of the formats above. For example:
$ terraform import google_discovery_engine_chat_engine.default projects/{{project}}/locations/{{location}}/collections/{{collection_id}}/engines/{{engine_id}}
$ terraform import google_discovery_engine_chat_engine.default {{project}}/{{location}}/{{collection_id}}/{{engine_id}}
$ terraform import google_discovery_engine_chat_engine.default {{location}}/{{collection_id}}/{{engine_id}}
This resource supports User Project Overrides.