Skip to content

Commit

Permalink
fix(agent): add display name (#529)
Browse files Browse the repository at this point in the history
Because

lacks the dispaly name in agent aupdate request 

This commit

1. add display name in update agent request
2. changes comments

---------

Co-authored-by: droplet-bot <[email protected]>
  • Loading branch information
Yougigun and droplet-bot authored Nov 29, 2024
1 parent bbbeead commit b934416
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 66 deletions.
70 changes: 36 additions & 34 deletions app/app/v1alpha/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,35 @@ import "google/protobuf/timestamp.proto";
message Agent {
// agent uid
string agent_uid = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// The agent display name.
// agent display name
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// The agent description.
// agent description
string description = 3 [(google.api.field_behavior) = OPTIONAL];
// The namespace of the agent.
// namespace uid
string namespace_uid = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// The agent tags.
// agent tags
repeated string tags = 5 [(google.api.field_behavior) = OPTIONAL];
// The agent metadata.
// agent metadata
AIAgentAppMetadata ai_agent_metadata = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// creator uid
string creator_uid = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
// The creation time of the agent.
// creation time
google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
// The last update time of the agent.
// last update time
google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// AIAgentAppMetadata represents the metadata for the AI agent app.
message AIAgentAppMetadata {
// The instructions for the AI agent app.
// instructions
string instructions = 1 [(google.api.field_behavior) = OPTIONAL];
// The tools(pipelines) that the AI agent app can use.
// tools(pipelines)
repeated Tool tools = 2 [(google.api.field_behavior) = OPTIONAL];
// The catalog uids that the AI agent app can use.
// catalog uids
repeated string catalog_uids = 3 [(google.api.field_behavior) = OPTIONAL];
// The AI agent app top k.
// AI agent app top k
int32 chunk_top_k = 4 [(google.api.field_behavior) = OPTIONAL];
// The AI agent chunk weight.
// AI agent chunk weight
float chunk_weight = 5 [(google.api.field_behavior) = OPTIONAL];
}

Expand All @@ -54,61 +54,63 @@ message Tool {

// CreateAgentRequest represents a request to create a agent.
message CreateAgentRequest {
// The app's owner(namespaces).
// namespace id
string namespace_id = 1 [(google.api.field_behavior) = REQUIRED];
// The agent display name.
// agent display name
string display_name = 2 [(google.api.field_behavior) = OPTIONAL];
// The agent description.
// agent description
string description = 3 [(google.api.field_behavior) = OPTIONAL];
// The agent tags.
// agent tags
repeated string tags = 4 [(google.api.field_behavior) = OPTIONAL];
// The agent metadata.
AIAgentAppMetadata ai_agent_app = 5 [(google.api.field_behavior) = OPTIONAL];
// agent metadata
AIAgentAppMetadata ai_agent_metadata = 5 [(google.api.field_behavior) = OPTIONAL];
}

// CreateAgentResponse represents a response for creating a agent.
message CreateAgentResponse {
// The created agent.
// created agent
Agent agent = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// ListAgentsRequest represents a request to list agents.
message ListAgentsRequest {
// The app's owner(namespaces).
// namespace id
string namespace_id = 1 [(google.api.field_behavior) = REQUIRED];
}

// ListAgentsResponse represents a response for listing agents.
message ListAgentsResponse {
// The agents.
// agents
repeated Agent agents = 1;
}

// UpdateAgentRequest represents a request to update a agent.
message UpdateAgentRequest {
// The app's owner(namespaces).
// namespace id
string namespace_id = 1 [(google.api.field_behavior) = REQUIRED];
// The agent uid.
// agent uid
string agent_uid = 2 [(google.api.field_behavior) = REQUIRED];
// The agent description.
string description = 3 [(google.api.field_behavior) = OPTIONAL];
// The agent tags.
repeated string tags = 4 [(google.api.field_behavior) = OPTIONAL];
// The agent metadata.
AIAgentAppMetadata ai_agent_app = 5 [(google.api.field_behavior) = OPTIONAL];
// agent display name
string display_name = 3 [(google.api.field_behavior) = OPTIONAL];
// agent description
string description = 4 [(google.api.field_behavior) = OPTIONAL];
// agent tags
repeated string tags = 5 [(google.api.field_behavior) = OPTIONAL];
// agent metadata
AIAgentAppMetadata ai_agent_metadata = 6 [(google.api.field_behavior) = OPTIONAL];
}

// UpdateAgentResponse represents a response for updating a agent.
message UpdateAgentResponse {
// The updated agent.
// updated agent
Agent agent = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// DeleteAgentRequest represents a request to delete a agent.
message DeleteAgentRequest {
// The app's owner(namespaces).
// namespace id
string namespace_id = 1 [(google.api.field_behavior) = REQUIRED];
// The agent uid.
// agent uid
string agent_uid = 2 [(google.api.field_behavior) = REQUIRED];
}

Expand All @@ -117,12 +119,12 @@ message DeleteAgentResponse {}

// ListToolsRequest represents a request to list tools.
message ListToolsRequest {
// The app's owner(namespaces).
// namespace id
string namespace_id = 1 [(google.api.field_behavior) = REQUIRED];
}

// ListToolsResponse represents a response for listing tools.
message ListToolsResponse {
// The tools.
// tools
repeated Tool tools = 1;
}
67 changes: 35 additions & 32 deletions openapi/v2/service.swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ paths:
$ref: '#/definitions/rpc.Status'
parameters:
- name: namespaceId
description: The app's owner(namespaces).
description: namespace id
in: path
required: true
type: string
Expand All @@ -383,7 +383,7 @@ paths:
$ref: '#/definitions/rpc.Status'
parameters:
- name: namespaceId
description: The app's owner(namespaces).
description: namespace id
in: path
required: true
type: string
Expand Down Expand Up @@ -414,12 +414,12 @@ paths:
$ref: '#/definitions/rpc.Status'
parameters:
- name: namespaceId
description: The app's owner(namespaces).
description: namespace id
in: path
required: true
type: string
- name: agentUid
description: The agent uid.
description: agent uid
in: path
required: true
type: string
Expand All @@ -444,12 +444,12 @@ paths:
$ref: '#/definitions/rpc.Status'
parameters:
- name: namespaceId
description: The app's owner(namespaces).
description: namespace id
in: path
required: true
type: string
- name: agentUid
description: The agent uid.
description: agent uid
in: path
required: true
type: string
Expand Down Expand Up @@ -850,7 +850,7 @@ paths:
$ref: '#/definitions/rpc.Status'
parameters:
- name: namespaceId
description: The app's owner(namespaces).
description: namespace id
in: path
required: true
type: string
Expand Down Expand Up @@ -5678,26 +5678,26 @@ definitions:
properties:
instructions:
type: string
description: The instructions for the AI agent app.
title: instructions
tools:
type: array
items:
type: object
$ref: '#/definitions/Tool'
description: The tools(pipelines) that the AI agent app can use.
title: tools(pipelines)
catalogUids:
type: array
items:
type: string
description: The catalog uids that the AI agent app can use.
title: catalog uids
chunkTopK:
type: integer
format: int32
description: The AI agent app top k.
title: AI agent app top k
chunkWeight:
type: number
format: float
description: The AI agent chunk weight.
title: AI agent chunk weight
description: AIAgentAppMetadata represents the metadata for the AI agent app.
AIAssistantAppMetadata:
type: object
Expand All @@ -5722,21 +5722,21 @@ definitions:
readOnly: true
displayName:
type: string
description: The agent display name.
title: agent display name
description:
type: string
description: The agent description.
title: agent description
namespaceUid:
type: string
description: The namespace of the agent.
title: namespace uid
readOnly: true
tags:
type: array
items:
type: string
description: The agent tags.
title: agent tags
aiAgentMetadata:
description: The agent metadata.
title: agent metadata
readOnly: true
allOf:
- $ref: '#/definitions/AIAgentAppMetadata'
Expand All @@ -5747,12 +5747,12 @@ definitions:
createTime:
type: string
format: date-time
description: The creation time of the agent.
title: creation time
readOnly: true
updateTime:
type: string
format: date-time
description: The last update time of the agent.
title: last update time
readOnly: true
description: Agent represents a agent.
required:
Expand Down Expand Up @@ -6908,25 +6908,25 @@ definitions:
properties:
displayName:
type: string
description: The agent display name.
title: agent display name
description:
type: string
description: The agent description.
title: agent description
tags:
type: array
items:
type: string
description: The agent tags.
aiAgentApp:
description: The agent metadata.
title: agent tags
aiAgentMetadata:
title: agent metadata
allOf:
- $ref: '#/definitions/AIAgentAppMetadata'
description: CreateAgentRequest represents a request to create a agent.
CreateAgentResponse:
type: object
properties:
agent:
description: The created agent.
title: created agent
readOnly: true
allOf:
- $ref: '#/definitions/Agent'
Expand Down Expand Up @@ -7914,7 +7914,7 @@ definitions:
items:
type: object
$ref: '#/definitions/Agent'
description: The agents.
title: agents
description: ListAgentsResponse represents a response for listing agents.
ListAppsResponse:
type: object
Expand Down Expand Up @@ -8683,7 +8683,7 @@ definitions:
items:
type: object
$ref: '#/definitions/Tool'
description: The tools.
title: tools
description: ListToolsResponse represents a response for listing tools.
ListUserMembershipsResponse:
type: object
Expand Down Expand Up @@ -10754,24 +10754,27 @@ definitions:
UpdateAgentBody:
type: object
properties:
displayName:
type: string
title: agent display name
description:
type: string
description: The agent description.
title: agent description
tags:
type: array
items:
type: string
description: The agent tags.
aiAgentApp:
description: The agent metadata.
title: agent tags
aiAgentMetadata:
title: agent metadata
allOf:
- $ref: '#/definitions/AIAgentAppMetadata'
description: UpdateAgentRequest represents a request to update a agent.
UpdateAgentResponse:
type: object
properties:
agent:
description: The updated agent.
title: updated agent
readOnly: true
allOf:
- $ref: '#/definitions/Agent'
Expand Down

0 comments on commit b934416

Please sign in to comment.