Skip to content

Commit 1550ae8

Browse files
authored
πŸ› FIX: Handle special characters in description (#117)
1 parent 56347bc commit 1550ae8

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

β€Žpackages/baseai/src/memory/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ import path from 'path';
137137
138138
const ${memoryNameCamelCase} = (): MemoryI => ({
139139
name: '${memoryNameSlugified}',
140-
description: '${memoryInfo.description || ''}',
140+
description: ${JSON.stringify(memoryInfo.description) || ''},
141141
config: {
142142
useGitRepo: ${memoryInfo.useGitRepo},
143143
dirToTrack: path.posix.join(${memoryFilesDir

β€Žpackages/baseai/src/pipe/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function createPipe() {
3838
name: () =>
3939
p.text({
4040
message: 'Name of the pipe',
41-
placeholder: 'AI Pipe Agent',
41+
placeholder: 'ai-agent-pipe',
4242
validate: value => {
4343
const result = pipeNameSchema.safeParse(value);
4444
if (!result.success) {
@@ -135,7 +135,7 @@ const ${pipeNameCamelCase} = (): PipeI => ({
135135
// Replace with your API key https://langbase.com/docs/api-reference/api-keys
136136
apiKey: process.env.LANGBASE_API_KEY!,
137137
name: '${pipeNameSlugified}',
138-
description: '${pipeInfo.description || ''}',
138+
description: ${JSON.stringify(pipeInfo.description) || ''},
139139
status: '${pipeInfo.status}',
140140
model: 'openai:gpt-4o-mini',
141141
stream: true,

β€Žpackages/baseai/src/tool/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ const ${camelCaseNameToolName} = (): ToolI => ({
110110
type: 'function' as const,
111111
function: {
112112
name: '${camelCaseNameToolName}',
113-
description: '${description}',
113+
description: ${JSON.stringify(description) || ''},
114114
parameters: {},
115115
},
116116
});

0 commit comments

Comments
Β (0)