@@ -67,16 +67,16 @@ resource "google_ces_app" "ces_app_for_agent" {
6767 }
6868}
6969
70- // resource "google_ces_tool" "ces_tool_for_agent" {
71- // location = "us"
72- // app = google_ces_app.ces_app_for_agent.app_id
73- // tool_id = "tool-1"
74- // execution_type = "SYNCHRONOUS"
75- // python_function {
76- // name = "example_function"
77- // python_code = "def example_function() -> int: return 0"
78- // }
79- // }
70+ resource "google_ces_tool" "ces_tool_for_agent" {
71+ location = "us"
72+ app = google_ces_app.ces_app_for_agent.app_id
73+ tool_id = "tool-1"
74+ execution_type = "SYNCHRONOUS"
75+ python_function {
76+ name = "example_function"
77+ python_code = "def example_function() -> int: return 0"
78+ }
79+ }
8080
8181resource "google_ces_toolset" "ces_toolset_for_agent" {
8282 toolset_id = "tf-test-toolset-id%{random_suffix}"
@@ -131,28 +131,28 @@ resource "google_ces_agent" "ces_child_agent" {
131131}
132132
133133
134- // resource "google_ces_guardrail" "ces_guardrail_for_agent" {
135- // guardrail_id = "guardrail-id"
136- // location = google_ces_app.ces_app_for_agent.location
137- // app = google_ces_app.ces_app_for_agent.app_id
138- // display_name = "Example guardrail"
139- // description = "Guardrail description"
140- // action {
141- // respond_immediately {
142- // responses {
143- // text = "Text"
144- // disabled = false
145- // }
146- // }
147- // }
148- // enabled = true
149- // model_safety {
150- // safety_settings {
151- // category = "HARM_CATEGORY_HATE_SPEECH"
152- // threshold = "BLOCK_NONE"
153- // }
154- // }
155- // }
134+ resource "google_ces_guardrail" "ces_guardrail_for_agent" {
135+ guardrail_id = "guardrail-id"
136+ location = google_ces_app.ces_app_for_agent.location
137+ app = google_ces_app.ces_app_for_agent.app_id
138+ display_name = "Example guardrail"
139+ description = "Guardrail description"
140+ action {
141+ respond_immediately {
142+ responses {
143+ text = "Text"
144+ disabled = false
145+ }
146+ }
147+ }
148+ enabled = true
149+ model_safety {
150+ safety_settings {
151+ category = "HARM_CATEGORY_HATE_SPEECH"
152+ threshold = "BLOCK_NONE"
153+ }
154+ }
155+ }
156156
157157
158158
@@ -203,13 +203,13 @@ resource "google_ces_agent" "ces_agent_basic" {
203203 python_code = "def callback(context):\n return {'override': False}"
204204 }
205205
206- // tools = [
207- // google_ces_tool.ces_tool_for_agent.id
208- // ]
206+ tools = [
207+ google_ces_tool.ces_tool_for_agent.id
208+ ]
209209
210- // guardrails = [
211- // google_ces_guardrail.ces_guardrail_for_agent.id
212- // ]
210+ guardrails = [
211+ google_ces_guardrail.ces_guardrail_for_agent.id
212+ ]
213213
214214 toolsets {
215215 toolset = google_ces_toolset.ces_toolset_for_agent.id
@@ -243,16 +243,16 @@ resource "google_ces_app" "ces_app_for_agent" {
243243 }
244244}
245245
246- // resource "google_ces_tool" "ces_tool_for_agent" {
247- // location = "us"
248- // app = google_ces_app.ces_app_for_agent.app_id
249- // tool_id = "tool-1"
250- // execution_type = "SYNCHRONOUS"
251- // python_function {
252- // name = "example_function"
253- // python_code = "def example_function() -> int: return 0"
254- // }
255- // }
246+ resource "google_ces_tool" "ces_tool_for_agent" {
247+ location = "us"
248+ app = google_ces_app.ces_app_for_agent.app_id
249+ tool_id = "tool-1"
250+ execution_type = "SYNCHRONOUS"
251+ python_function {
252+ name = "example_function"
253+ python_code = "def example_function() -> int: return 0"
254+ }
255+ }
256256
257257resource "google_ces_toolset" "ces_toolset_for_agent" {
258258 toolset_id = "tf-test-toolset-id%{random_suffix}"
@@ -302,28 +302,28 @@ resource "google_ces_agent" "ces_child_agent" {
302302}
303303
304304
305- // resource "google_ces_guardrail" "ces_guardrail_for_agent" {
306- // guardrail_id = "guardrail-id"
307- // location = google_ces_app.ces_app_for_agent.location
308- // app = google_ces_app.ces_app_for_agent.app_id
309- // display_name = "Example guardrail"
310- // description = "Guardrail description"
311- // action {
312- // respond_immediately {
313- // responses {
314- // text = "Text"
315- // disabled = false
316- // }
317- // }
318- // }
319- // enabled = true
320- // model_safety {
321- // safety_settings {
322- // category = "HARM_CATEGORY_HATE_SPEECH"
323- // threshold = "BLOCK_NONE"
324- // }
325- // }
326- // }
305+ resource "google_ces_guardrail" "ces_guardrail_for_agent" {
306+ guardrail_id = "guardrail-id"
307+ location = google_ces_app.ces_app_for_agent.location
308+ app = google_ces_app.ces_app_for_agent.app_id
309+ display_name = "Example guardrail"
310+ description = "Guardrail description"
311+ action {
312+ respond_immediately {
313+ responses {
314+ text = "Text"
315+ disabled = false
316+ }
317+ }
318+ }
319+ enabled = true
320+ model_safety {
321+ safety_settings {
322+ category = "HARM_CATEGORY_HATE_SPEECH"
323+ threshold = "BLOCK_NONE"
324+ }
325+ }
326+ }
327327
328328
329329
0 commit comments