Refine personal Agent cards and configuration
This commit is contained in:
1 parent
c14d996c05
commit
8b40463a9f
17 files changed
+555
-412
No files matched your search
@@ -108,7 +108,7 @@ function projectDraft(value: unknown): CloudAgentDraft {
|
||||
slug: slug(textField(item.slug, 80)),
|
||||
name: textField(item.name, 100),
|
||||
icon: item.icon == null ? null : textField(item.icon, 255, false),
|
||||
purpose: textField(item.purpose, 2000),
|
||||
purpose: textField(item.purpose, 2000, false),
|
||||
system_prompt: textField(item.system_prompt, 32000, false),
|
||||
draft_revision: revision(item.draft_revision),
|
||||
updated_at: textField(item.updated_at, 40),
|
||||
@@ -203,7 +203,7 @@ export class CloudAgentsModule {
|
||||
const body: CreateCloudAgent = {
|
||||
operation_id: operationId,
|
||||
name: textField(input.name, 100).trim(),
|
||||
purpose: textField(input.purpose, 2000).trim(),
|
||||
purpose: textField(input.purpose, 2000, false).trim(),
|
||||
...(input.icon === undefined ? {} : { icon: input.icon === null ? null : textField(input.icon, 255, false) }),
|
||||
};
|
||||
return this.withRecovery('createAgent', { ...body }, () => this.request('/api/makelore/agents', 'POST', body).then(result => this.withAvatar(projectDraft(result))));
|
||||
@@ -297,7 +297,7 @@ export class CloudAgentsModule {
|
||||
const body: SaveCloudAgentDraft = {
|
||||
expected_revision: revision(input.expected_revision),
|
||||
name: textField(input.name, 100).trim(),
|
||||
purpose: textField(input.purpose, 2000).trim(),
|
||||
purpose: textField(input.purpose, 2000, false).trim(),
|
||||
system_prompt: textField(input.system_prompt, 32000, false),
|
||||
...(input.icon === undefined ? {} : { icon: input.icon === null ? null : textField(input.icon, 255, false) }),
|
||||
...(input.configuration === undefined ? {} : { configuration: configuration(input.configuration) }),
|
||||
|
||||
Reference in new issue
Block a user