Skip to content

Commit

Permalink
Use nanoid
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkpiano committed Jun 13, 2024
1 parent 5f863bb commit 7bc363f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@statelyai/agent",
"version": "0.1.2",
"version": "0.1.3",
"description": "",
"main": "dist/index.js",
"module": "dist/index.mjs",
Expand Down
4 changes: 2 additions & 2 deletions src/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export async function agentStreamText(
};
const template = resolvedOptions.template ?? defaultTextTemplate;

const id = randomUUID();
const id = nanoid();
const goal =
typeof resolvedOptions.prompt === 'string'
? resolvedOptions.prompt
Expand Down Expand Up @@ -148,7 +148,7 @@ export async function agentStreamText(
rawResponse: res.rawResponse,
},
content: res.text,
id: randomUUID(),
id: nanoid(),
timestamp: Date.now(),
responseId: id,
});
Expand Down

0 comments on commit 7bc363f

Please sign in to comment.