Skip to content

Commit

Permalink
remove user id
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Jan 30, 2025
1 parent fb2f42b commit 3971a0a
Show file tree
Hide file tree
Showing 5 changed files with 142 additions and 171 deletions.
6 changes: 4 additions & 2 deletions examples/example-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,11 @@ async function main() {
const outputs: any = await orchestrator.dispatchToInput(
"user_chat",
{
content: userMessage,
userId,
headers: {
"x-user-id": userId,
},
},
userMessage,
userId
);

Expand Down
9 changes: 4 additions & 5 deletions examples/example-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,15 @@ wss.on("connection", (ws) => {
throw new Error("userId is required");
}

orchestrator.initializeOrchestrator(userId);

// Process the message using the orchestrator with the provided userId
const outputs = await orchestrator.dispatchToInput(
"user_chat",
{
content: userMessage,
userId: userId,
headers: {
"x-user-id": userId,
},
},
userId,
userMessage,
orchestratorId ? orchestratorId : undefined
);

Expand Down
Loading

0 comments on commit 3971a0a

Please sign in to comment.