Skip to content

Commit

Permalink
feature/remove-chat-id-req-from-stt-token (#109)
Browse files Browse the repository at this point in the history
* remove chatId

* v1.0.19-beta.136
  • Loading branch information
nivzelber authored Jan 21, 2025
1 parent 4009aec commit 65db0df
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@d-id/client-sdk",
"private": false,
"version": "1.0.19-beta.135",
"version": "1.0.19-beta.136",
"type": "module",
"description": "d-id client sdk",
"repository": {
Expand Down Expand Up @@ -44,4 +44,4 @@
"vite": "^5.1.4",
"vite-plugin-dts": "^3.7.3"
}
}
}
4 changes: 2 additions & 2 deletions src/api/agents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export function createAgentsApi(
deleteRating(agentId: string, chatId: string, ratingId: string, options?: RequestInit) {
return client.delete<RatingEntity>(`/${agentId}/chat/${chatId}/ratings/${ratingId}`, options);
},
getSTTToken(agentId: string, chatId: string, options?: RequestInit) {
return client.get<STTTokenResponse>(`/${agentId}/chat/${chatId}/stt-token`, options);
getSTTToken(agentId: string, options?: RequestInit) {
return client.get<STTTokenResponse>(`/${agentId}/stt-token`, options);
},
};
}
2 changes: 1 addition & 1 deletion src/createAgentManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ export async function createAgentManager(agent: string, options: AgentManagerOpt
return {
agent: agentInstance,
starterMessages: agentInstance.knowledge?.starter_message || [],
getSTTToken: async () => (items.chat?.id ? agentsApi.getSTTToken(agentInstance.id, items.chat.id) : undefined),
getSTTToken: () => agentsApi.getSTTToken(agentInstance.id),
changeMode,
async connect() {
await connect(true);
Expand Down

0 comments on commit 65db0df

Please sign in to comment.