serves things up sort of
This commit is contained in:
parent
b36235801b
commit
30cb348269
1 changed files with 1 additions and 1 deletions
|
@ -268,7 +268,7 @@ class OpenAIAsync::Server :repr(HASH) :strict(params) {
|
||||||
|
|
||||||
method _resp_custom($req, $code, $str, $json = 0) {
|
method _resp_custom($req, $code, $str, $json = 0) {
|
||||||
my $response = HTTP::Response->new( $code );
|
my $response = HTTP::Response->new( $code );
|
||||||
$response->content_type('text/plain') unless $json;
|
$response->content_type('text/plain') unless $json; # TODO this needs to be more flexible due to audio outputs
|
||||||
$response->content_type('application/json') if $json;
|
$response->content_type('application/json') if $json;
|
||||||
$response->add_content($str);
|
$response->add_content($str);
|
||||||
$response->content_length(length $str);
|
$response->content_length(length $str);
|
||||||
|
|
Loading…
Add table
Reference in a new issue