Conversation
|
@iBotPeaches I set the client version to Also, testing was a bit more annoying than I anticipated: Since the route is only loaded if webhooks are enabled in the config file, I need to set configuration values before loading the service provider. I couldn't get it to work in Pest, so I used a PHPUnit test class instead; if you've got a better solution, I'd love to hear it 🙆♂️ |
iBotPeaches
left a comment
There was a problem hiding this comment.
Enabled CI to run and quick comment
Looking back at this, looks like v8 of psr bridge is PHP 8.4 or above. Our min of 8.2 can hopefully be met with an older version of that. I normally cut client/laravel together, but I see its a chicken/egg problem here with the dependency. I'll cut a client release this week. |
|
v0.19.0 of client is out. This should be workable |
What:
Description:
This PR adds webhook handling to the library. This works by adding a webhook route to the application that accepts OpenAI webhook requests and dispatches an event with the request details. Users can listen to this event to implement application-specific handling.
The webhook endpoint can be customised via configuration; if that doesn't suffice, the signature verification middleware can also be used separately.
Configuration
The following new configuration parameters are available:
openai.webhook.enabledfalseopenai.webhook.secretopenai.webhook.uri/openai/webhookopenai.webhook.domainopenai.webhook.middlewareRelated:
This will solve #186.