Skip to content

Commit 8c16474

Browse files
committed
fix open ai on azure
1 parent b22e801 commit 8c16474

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

examples/workflow/workflow-interrupt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
}
3535

3636
// Resume the workflow providing external data
37-
$finalState = $workflow->start(true, 'approved')->getResult();
37+
$finalState = $workflow->wakeup('approved')->getResult();
3838

3939
// It should print "approved"
4040
echo $finalState->get('received_feedback').\PHP_EOL;

src/Providers/OpenAI/AzureOpenAI.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ public function __construct(
1515
protected string $endpoint,
1616
protected string $model,
1717
protected string $version,
18+
protected bool $strict_response = false,
1819
protected array $parameters = [],
1920
) {
21+
parent::__construct($key, $model, $parameters, $strict_response);
22+
2023
$this->setBaseUrl();
2124

2225
$this->client = new Client([

src/Workflow/Workflow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function start(
7272
return new WorkflowHandler($this, $resume, $externalFeedback);
7373
}
7474

75-
public function awake(mixed $feedback = null): WorkflowHandler
75+
public function wakeup(mixed $feedback = null): WorkflowHandler
7676
{
7777
return new WorkflowHandler($this, true, $feedback);
7878
}

src/Workflow/WorkflowInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface WorkflowInterface extends \SplSubject
88
{
99
public function start(bool $resume = false, mixed $externalFeedback = null): WorkflowHandler;
1010

11-
public function awake(mixed $feedback = null): WorkflowHandler;
11+
public function wakeup(mixed $feedback = null): WorkflowHandler;
1212

1313
public function addNode(NodeInterface $node): Workflow;
1414

0 commit comments

Comments
 (0)