Skip to content

Commit

Permalink
Set default user_Id
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanDalton committed Jan 24, 2024
1 parent e1ae1fe commit cae7ab2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Requests/CreateCompletionRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public function resolveEndpoint(): string

public function defaultBody(): array
{
if(! isset($metadata['user_id'])) {
$metadata['user_id'] = uniqid();
}

return [
'model' => 'claude-2',
'prompt' => $this->prompt,
Expand Down

0 comments on commit cae7ab2

Please sign in to comment.