An example represents a sample conversation between the user and the agent(s).
Example Usage
Ces Example Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
import * as std from "@pulumi/std";
const my_app = new gcp.ces.App("my-app", {
location: "us",
displayName: "my-app",
appId: "app-id",
timeZoneSettings: {
timeZone: "America/Los_Angeles",
},
});
const my_example = new gcp.ces.Example("my-example", {
location: "us",
displayName: "my-example",
app: my_app.name,
exampleId: "example-id",
description: "example description",
messages: [{
chunks: [
{
image: {
mimeType: "image/png",
data: std.base64encode({
input: "This is some fake image binary data.",
}).then(invoke => invoke.result),
},
},
{
text: "text_data",
},
{
updatedVariables: JSON.stringify({
var1: "val1",
var2: "val2",
}),
},
],
role: "agent",
}],
});
import pulumi
import json
import pulumi_gcp as gcp
import pulumi_std as std
my_app = gcp.ces.App("my-app",
location="us",
display_name="my-app",
app_id="app-id",
time_zone_settings={
"time_zone": "America/Los_Angeles",
})
my_example = gcp.ces.Example("my-example",
location="us",
display_name="my-example",
app=my_app.name,
example_id="example-id",
description="example description",
messages=[{
"chunks": [
{
"image": {
"mime_type": "image/png",
"data": std.base64encode(input="This is some fake image binary data.").result,
},
},
{
"text": "text_data",
},
{
"updated_variables": json.dumps({
"var1": "val1",
"var2": "val2",
}),
},
],
"role": "agent",
}])
package main
import (
"encoding/json"
"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/ces"
"github.com/pulumi/pulumi-std/sdk/go/std"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
my_app, err := ces.NewApp(ctx, "my-app", &ces.AppArgs{
Location: pulumi.String("us"),
DisplayName: pulumi.String("my-app"),
AppId: pulumi.String("app-id"),
TimeZoneSettings: &ces.AppTimeZoneSettingsArgs{
TimeZone: pulumi.String("America/Los_Angeles"),
},
})
if err != nil {
return err
}
tmpJSON0, err := json.Marshal(map[string]interface{}{
"var1": "val1",
"var2": "val2",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
invokeBase64encode, err := std.Base64encode(ctx, &std.Base64encodeArgs{
Input: "This is some fake image binary data.",
}, nil)
if err != nil {
return err
}
_, err = ces.NewExample(ctx, "my-example", &ces.ExampleArgs{
Location: pulumi.String("us"),
DisplayName: pulumi.String("my-example"),
App: my_app.Name,
ExampleId: pulumi.String("example-id"),
Description: pulumi.String("example description"),
Messages: ces.ExampleMessageArray{
&ces.ExampleMessageArgs{
Chunks: ces.ExampleMessageChunkArray{
&ces.ExampleMessageChunkArgs{
Image: &ces.ExampleMessageChunkImageArgs{
MimeType: pulumi.String("image/png"),
Data: pulumi.String(invokeBase64encode.Result),
},
},
&ces.ExampleMessageChunkArgs{
Text: pulumi.String("text_data"),
},
&ces.ExampleMessageChunkArgs{
UpdatedVariables: pulumi.String(json0),
},
},
Role: pulumi.String("agent"),
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Gcp = Pulumi.Gcp;
using Std = Pulumi.Std;
return await Deployment.RunAsync(() =>
{
var my_app = new Gcp.Ces.App("my-app", new()
{
Location = "us",
DisplayName = "my-app",
AppId = "app-id",
TimeZoneSettings = new Gcp.Ces.Inputs.AppTimeZoneSettingsArgs
{
TimeZone = "America/Los_Angeles",
},
});
var my_example = new Gcp.Ces.Example("my-example", new()
{
Location = "us",
DisplayName = "my-example",
App = my_app.Name,
ExampleId = "example-id",
Description = "example description",
Messages = new[]
{
new Gcp.Ces.Inputs.ExampleMessageArgs
{
Chunks = new[]
{
new Gcp.Ces.Inputs.ExampleMessageChunkArgs
{
Image = new Gcp.Ces.Inputs.ExampleMessageChunkImageArgs
{
MimeType = "image/png",
Data = Std.Base64encode.Invoke(new()
{
Input = "This is some fake image binary data.",
}).Apply(invoke => invoke.Result),
},
},
new Gcp.Ces.Inputs.ExampleMessageChunkArgs
{
Text = "text_data",
},
new Gcp.Ces.Inputs.ExampleMessageChunkArgs
{
UpdatedVariables = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["var1"] = "val1",
["var2"] = "val2",
}),
},
},
Role = "agent",
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.ces.App;
import com.pulumi.gcp.ces.AppArgs;
import com.pulumi.gcp.ces.inputs.AppTimeZoneSettingsArgs;
import com.pulumi.gcp.ces.Example;
import com.pulumi.gcp.ces.ExampleArgs;
import com.pulumi.gcp.ces.inputs.ExampleMessageArgs;
import com.pulumi.std.StdFunctions;
import com.pulumi.std.inputs.Base64encodeArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var my_app = new App("my-app", AppArgs.builder()
.location("us")
.displayName("my-app")
.appId("app-id")
.timeZoneSettings(AppTimeZoneSettingsArgs.builder()
.timeZone("America/Los_Angeles")
.build())
.build());
var my_example = new Example("my-example", ExampleArgs.builder()
.location("us")
.displayName("my-example")
.app(my_app.name())
.exampleId("example-id")
.description("example description")
.messages(ExampleMessageArgs.builder()
.chunks(
ExampleMessageChunkArgs.builder()
.image(ExampleMessageChunkImageArgs.builder()
.mimeType("image/png")
.data(StdFunctions.base64encode(Base64encodeArgs.builder()
.input("This is some fake image binary data.")
.build()).result())
.build())
.build(),
ExampleMessageChunkArgs.builder()
.text("text_data")
.build(),
ExampleMessageChunkArgs.builder()
.updatedVariables(serializeJson(
jsonObject(
jsonProperty("var1", "val1"),
jsonProperty("var2", "val2")
)))
.build())
.role("agent")
.build())
.build());
}
}
resources:
my-app:
type: gcp:ces:App
properties:
location: us
displayName: my-app
appId: app-id
timeZoneSettings:
timeZone: America/Los_Angeles
my-example:
type: gcp:ces:Example
properties:
location: us
displayName: my-example
app: ${["my-app"].name}
exampleId: example-id
description: example description
messages:
- chunks:
- image:
mimeType: image/png
data:
fn::invoke:
function: std:base64encode
arguments:
input: This is some fake image binary data.
return: result
- text: text_data
- updatedVariables:
fn::toJSON:
var1: val1
var2: val2
role: agent
Create Example Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Example(name: string, args: ExampleArgs, opts?: CustomResourceOptions);@overload
def Example(resource_name: str,
args: ExampleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Example(resource_name: str,
opts: Optional[ResourceOptions] = None,
app: Optional[str] = None,
display_name: Optional[str] = None,
example_id: Optional[str] = None,
location: Optional[str] = None,
description: Optional[str] = None,
messages: Optional[Sequence[ExampleMessageArgs]] = None,
project: Optional[str] = None)func NewExample(ctx *Context, name string, args ExampleArgs, opts ...ResourceOption) (*Example, error)public Example(string name, ExampleArgs args, CustomResourceOptions? opts = null)
public Example(String name, ExampleArgs args)
public Example(String name, ExampleArgs args, CustomResourceOptions options)
type: gcp:ces:Example
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ExampleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ExampleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ExampleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ExampleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ExampleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampleResource = new Gcp.Ces.Example("exampleResource", new()
{
App = "string",
DisplayName = "string",
ExampleId = "string",
Location = "string",
Description = "string",
Messages = new[]
{
new Gcp.Ces.Inputs.ExampleMessageArgs
{
Chunks = new[]
{
new Gcp.Ces.Inputs.ExampleMessageChunkArgs
{
Image = new Gcp.Ces.Inputs.ExampleMessageChunkImageArgs
{
Data = "string",
MimeType = "string",
},
Text = "string",
UpdatedVariables = "string",
},
},
Role = "string",
},
},
Project = "string",
});
example, err := ces.NewExample(ctx, "exampleResource", &ces.ExampleArgs{
App: pulumi.String("string"),
DisplayName: pulumi.String("string"),
ExampleId: pulumi.String("string"),
Location: pulumi.String("string"),
Description: pulumi.String("string"),
Messages: ces.ExampleMessageArray{
&ces.ExampleMessageArgs{
Chunks: ces.ExampleMessageChunkArray{
&ces.ExampleMessageChunkArgs{
Image: &ces.ExampleMessageChunkImageArgs{
Data: pulumi.String("string"),
MimeType: pulumi.String("string"),
},
Text: pulumi.String("string"),
UpdatedVariables: pulumi.String("string"),
},
},
Role: pulumi.String("string"),
},
},
Project: pulumi.String("string"),
})
var exampleResource = new Example("exampleResource", ExampleArgs.builder()
.app("string")
.displayName("string")
.exampleId("string")
.location("string")
.description("string")
.messages(ExampleMessageArgs.builder()
.chunks(ExampleMessageChunkArgs.builder()
.image(ExampleMessageChunkImageArgs.builder()
.data("string")
.mimeType("string")
.build())
.text("string")
.updatedVariables("string")
.build())
.role("string")
.build())
.project("string")
.build());
example_resource = gcp.ces.Example("exampleResource",
app="string",
display_name="string",
example_id="string",
location="string",
description="string",
messages=[{
"chunks": [{
"image": {
"data": "string",
"mime_type": "string",
},
"text": "string",
"updated_variables": "string",
}],
"role": "string",
}],
project="string")
const exampleResource = new gcp.ces.Example("exampleResource", {
app: "string",
displayName: "string",
exampleId: "string",
location: "string",
description: "string",
messages: [{
chunks: [{
image: {
data: "string",
mimeType: "string",
},
text: "string",
updatedVariables: "string",
}],
role: "string",
}],
project: "string",
});
type: gcp:ces:Example
properties:
app: string
description: string
displayName: string
exampleId: string
location: string
messages:
- chunks:
- image:
data: string
mimeType: string
text: string
updatedVariables: string
role: string
project: string
Example Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Example resource accepts the following input properties:
- App string
- Resource ID segment making up resource
name, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Display
Name string - Display name of the example.
- Example
Id string - Location string
- Resource ID segment making up resource
name, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Description string
- Human-readable description of the example.
- Messages
List<Example
Message> - The collection of messages that make up the conversation. Structure is documented below.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- App string
- Resource ID segment making up resource
name, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Display
Name string - Display name of the example.
- Example
Id string - Location string
- Resource ID segment making up resource
name, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Description string
- Human-readable description of the example.
- Messages
[]Example
Message Args - The collection of messages that make up the conversation. Structure is documented below.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- app String
- Resource ID segment making up resource
name, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - display
Name String - Display name of the example.
- example
Id String - location String
- Resource ID segment making up resource
name, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - description String
- Human-readable description of the example.
- messages
List<Example
Message> - The collection of messages that make up the conversation. Structure is documented below.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- app string
- Resource ID segment making up resource
name, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - display
Name string - Display name of the example.
- example
Id string - location string
- Resource ID segment making up resource
name, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - description string
- Human-readable description of the example.
- messages
Example
Message[] - The collection of messages that make up the conversation. Structure is documented below.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- app str
- Resource ID segment making up resource
name, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - display_
name str - Display name of the example.
- example_
id str - location str
- Resource ID segment making up resource
name, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - description str
- Human-readable description of the example.
- messages
Sequence[Example
Message Args] - The collection of messages that make up the conversation. Structure is documented below.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- app String
- Resource ID segment making up resource
name, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - display
Name String - Display name of the example.
- example
Id String - location String
- Resource ID segment making up resource
name, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - description String
- Human-readable description of the example.
- messages List<Property Map>
- The collection of messages that make up the conversation. Structure is documented below.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the Example resource produces the following output properties:
- Create
Time string - Timestamp when the example was created.
- Etag string
- Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Invalid bool
- The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
- Name string
- Identifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example} - Update
Time string - Timestamp when the example was last updated.
- Create
Time string - Timestamp when the example was created.
- Etag string
- Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- Id string
- The provider-assigned unique ID for this managed resource.
- Invalid bool
- The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
- Name string
- Identifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example} - Update
Time string - Timestamp when the example was last updated.
- create
Time String - Timestamp when the example was created.
- etag String
- Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- id String
- The provider-assigned unique ID for this managed resource.
- invalid Boolean
- The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
- name String
- Identifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example} - update
Time String - Timestamp when the example was last updated.
- create
Time string - Timestamp when the example was created.
- etag string
- Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- id string
- The provider-assigned unique ID for this managed resource.
- invalid boolean
- The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
- name string
- Identifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example} - update
Time string - Timestamp when the example was last updated.
- create_
time str - Timestamp when the example was created.
- etag str
- Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- id str
- The provider-assigned unique ID for this managed resource.
- invalid bool
- The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
- name str
- Identifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example} - update_
time str - Timestamp when the example was last updated.
- create
Time String - Timestamp when the example was created.
- etag String
- Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- id String
- The provider-assigned unique ID for this managed resource.
- invalid Boolean
- The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
- name String
- Identifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example} - update
Time String - Timestamp when the example was last updated.
Look up Existing Example Resource
Get an existing Example resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ExampleState, opts?: CustomResourceOptions): Example@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
app: Optional[str] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
etag: Optional[str] = None,
example_id: Optional[str] = None,
invalid: Optional[bool] = None,
location: Optional[str] = None,
messages: Optional[Sequence[ExampleMessageArgs]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
update_time: Optional[str] = None) -> Examplefunc GetExample(ctx *Context, name string, id IDInput, state *ExampleState, opts ...ResourceOption) (*Example, error)public static Example Get(string name, Input<string> id, ExampleState? state, CustomResourceOptions? opts = null)public static Example get(String name, Output<String> id, ExampleState state, CustomResourceOptions options)resources: _: type: gcp:ces:Example get: id: ${id}- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- App string
- Resource ID segment making up resource
name, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Create
Time string - Timestamp when the example was created.
- Description string
- Human-readable description of the example.
- Display
Name string - Display name of the example.
- Etag string
- Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- Example
Id string - Invalid bool
- The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
- Location string
- Resource ID segment making up resource
name, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Messages
List<Example
Message> - The collection of messages that make up the conversation. Structure is documented below.
- Name string
- Identifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example} - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Update
Time string - Timestamp when the example was last updated.
- App string
- Resource ID segment making up resource
name, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Create
Time string - Timestamp when the example was created.
- Description string
- Human-readable description of the example.
- Display
Name string - Display name of the example.
- Etag string
- Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- Example
Id string - Invalid bool
- The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
- Location string
- Resource ID segment making up resource
name, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - Messages
[]Example
Message Args - The collection of messages that make up the conversation. Structure is documented below.
- Name string
- Identifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example} - Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Update
Time string - Timestamp when the example was last updated.
- app String
- Resource ID segment making up resource
name, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - create
Time String - Timestamp when the example was created.
- description String
- Human-readable description of the example.
- display
Name String - Display name of the example.
- etag String
- Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- example
Id String - invalid Boolean
- The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
- location String
- Resource ID segment making up resource
name, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - messages
List<Example
Message> - The collection of messages that make up the conversation. Structure is documented below.
- name String
- Identifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example} - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- update
Time String - Timestamp when the example was last updated.
- app string
- Resource ID segment making up resource
name, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - create
Time string - Timestamp when the example was created.
- description string
- Human-readable description of the example.
- display
Name string - Display name of the example.
- etag string
- Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- example
Id string - invalid boolean
- The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
- location string
- Resource ID segment making up resource
name, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - messages
Example
Message[] - The collection of messages that make up the conversation. Structure is documented below.
- name string
- Identifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example} - project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- update
Time string - Timestamp when the example was last updated.
- app str
- Resource ID segment making up resource
name, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - create_
time str - Timestamp when the example was created.
- description str
- Human-readable description of the example.
- display_
name str - Display name of the example.
- etag str
- Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- example_
id str - invalid bool
- The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
- location str
- Resource ID segment making up resource
name, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - messages
Sequence[Example
Message Args] - The collection of messages that make up the conversation. Structure is documented below.
- name str
- Identifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example} - project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- update_
time str - Timestamp when the example was last updated.
- app String
- Resource ID segment making up resource
name, defining the app the example belongs to. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - create
Time String - Timestamp when the example was created.
- description String
- Human-readable description of the example.
- display
Name String - Display name of the example.
- etag String
- Etag used to ensure the object hasn't changed during a read-modify-write operation. If the etag is empty, the update will overwrite any concurrent changes.
- example
Id String - invalid Boolean
- The example may become invalid if referencing resources are deleted. Invalid examples will not be used as few-shot examples.
- location String
- Resource ID segment making up resource
name, defining what region the parent app is in. It identifies the resource within its parent collection as described in https://google.aip.dev/122. - messages List<Property Map>
- The collection of messages that make up the conversation. Structure is documented below.
- name String
- Identifier. The unique identifier of the example.
Format:
projects/{project}/locations/{location}/apps/{app}/examples/{example} - project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- update
Time String - Timestamp when the example was last updated.
Supporting Types
ExampleMessage, ExampleMessageArgs
- Chunks
List<Example
Message Chunk> - Content of the message as a series of chunks. Structure is documented below.
- Role string
- The role within the conversation, e.g., user, agent.
- Chunks
[]Example
Message Chunk - Content of the message as a series of chunks. Structure is documented below.
- Role string
- The role within the conversation, e.g., user, agent.
- chunks
List<Example
Message Chunk> - Content of the message as a series of chunks. Structure is documented below.
- role String
- The role within the conversation, e.g., user, agent.
- chunks
Example
Message Chunk[] - Content of the message as a series of chunks. Structure is documented below.
- role string
- The role within the conversation, e.g., user, agent.
- chunks
Sequence[Example
Message Chunk] - Content of the message as a series of chunks. Structure is documented below.
- role str
- The role within the conversation, e.g., user, agent.
- chunks List<Property Map>
- Content of the message as a series of chunks. Structure is documented below.
- role String
- The role within the conversation, e.g., user, agent.
ExampleMessageChunk, ExampleMessageChunkArgs
- Image
Example
Message Chunk Image - Represents an image input or output in the conversation. Structure is documented below.
- Text string
- Text data.
- Updated
Variables string - A struct represents variables that were updated in the conversation, keyed by variable names.
- Image
Example
Message Chunk Image - Represents an image input or output in the conversation. Structure is documented below.
- Text string
- Text data.
- Updated
Variables string - A struct represents variables that were updated in the conversation, keyed by variable names.
- image
Example
Message Chunk Image - Represents an image input or output in the conversation. Structure is documented below.
- text String
- Text data.
- updated
Variables String - A struct represents variables that were updated in the conversation, keyed by variable names.
- image
Example
Message Chunk Image - Represents an image input or output in the conversation. Structure is documented below.
- text string
- Text data.
- updated
Variables string - A struct represents variables that were updated in the conversation, keyed by variable names.
- image
Example
Message Chunk Image - Represents an image input or output in the conversation. Structure is documented below.
- text str
- Text data.
- updated_
variables str - A struct represents variables that were updated in the conversation, keyed by variable names.
- image Property Map
- Represents an image input or output in the conversation. Structure is documented below.
- text String
- Text data.
- updated
Variables String - A struct represents variables that were updated in the conversation, keyed by variable names.
ExampleMessageChunkImage, ExampleMessageChunkImageArgs
Import
Example can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/apps/{{app}}/examples/{{name}}{{project}}/{{location}}/{{app}}/{{name}}{{location}}/{{app}}/{{name}}
When using the pulumi import command, Example can be imported using one of the formats above. For example:
$ pulumi import gcp:ces/example:Example default projects/{{project}}/locations/{{location}}/apps/{{app}}/examples/{{name}}
$ pulumi import gcp:ces/example:Example default {{project}}/{{location}}/{{app}}/{{name}}
$ pulumi import gcp:ces/example:Example default {{location}}/{{app}}/{{name}}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.
