Couple of bugs found in Object::Pad and Future::AsyncAwait. see the role changes going on here for what i have to do right now but will report these upstream later.
Some checks failed
ci/woodpecker/push/author-tests Pipeline failed

This commit is contained in:
Ryan Voots 2024-01-04 12:05:59 -05:00
parent f5be4d9e53
commit 276248d5dd
3 changed files with 5 additions and 2 deletions

View file

@ -9934,6 +9934,7 @@ OpenAIAsync::Server .build/previous/lib/OpenAIAsync/Server.pm 1;" p
OpenAIAsync::Server .build/s8al1KxdoG/blib/lib/OpenAIAsync/Server.pm 1;" p
OpenAIAsync::Server .build/s8al1KxdoG/lib/OpenAIAsync/Server.pm 1;" p
OpenAIAsync::Server lib/OpenAIAsync/Server.pm 1;" p
OpenAIAsync::Server::API::Test::ChatCompletion t/lib/OpenAIAsync/Server/API/Test/ChatCompletion.pm 1;" p
OpenAIAsync::Server::API::v1::Audio .build/6o4PVL1DX3/blib/lib/OpenAIAsync/Server/API/v1/Audio.pm 1;" p
OpenAIAsync::Server::API::v1::Audio .build/6o4PVL1DX3/lib/OpenAIAsync/Server/API/v1/Audio.pm 1;" p
OpenAIAsync::Server::API::v1::Audio .build/8vRKKpniYC/blib/lib/OpenAIAsync/Server/API/v1/Audio.pm 1;" p

View file

@ -239,7 +239,7 @@ class OpenAIAsync::Server :repr(HASH) :strict(params) {
method __make_http_server() {
# TODO args?
# TODO make this work during a reload
my $server_id = sprintf("%d\0%d", $listen, $port);
my $server_id = sprintf("%s\0%d", $listen, $port);
$ctx->{server_id} = $server_id;
$http_server = Net::Async::HTTP::Server->new(

View file

@ -26,6 +26,8 @@ OpenAIAsync::Server::API::ChatCompletion - Basic chat api role, consumed to impl
=cut
role OpenAIAsync::Server::API::v1::ChatCompletion :strict(params) {
use Future::AsyncAwait;
ADJUST {
$self->register_url(
method => 'POST',
@ -37,5 +39,5 @@ role OpenAIAsync::Server::API::v1::ChatCompletion :strict(params) {
);
}
async method chat($obj, $http_req, $ctx) {...}
method chat($obj, $http_req, $ctx);
}