diff --git a/.vstags b/.vstags index 7c66cd0..5094172 100644 --- a/.vstags +++ b/.vstags @@ -9865,8 +9865,6 @@ OpenAIAsync .build/bgXXjrPaza/blib/lib/OpenAIAsync.pm 1;" p OpenAIAsync .build/bgXXjrPaza/lib/OpenAIAsync.pm 1;" p OpenAIAsync .build/kLMGruHLIH/blib/lib/OpenAIAsync.pm 1;" p OpenAIAsync .build/kLMGruHLIH/lib/OpenAIAsync.pm 1;" p -OpenAIAsync .build/latest/blib/lib/OpenAIAsync.pm 1;" p -OpenAIAsync .build/latest/lib/OpenAIAsync.pm 1;" p OpenAIAsync .build/mKmyAW37h1/blib/lib/OpenAIAsync.pm 1;" p OpenAIAsync .build/mKmyAW37h1/lib/OpenAIAsync.pm 1;" p OpenAIAsync .build/previous/blib/lib/OpenAIAsync.pm 1;" p @@ -9892,8 +9890,6 @@ OpenAIAsync::Client .build/bgXXjrPaza/blib/lib/OpenAIAsync/Client.pm 1;" p OpenAIAsync::Client .build/bgXXjrPaza/lib/OpenAIAsync/Client.pm 1;" p OpenAIAsync::Client .build/kLMGruHLIH/blib/lib/OpenAIAsync/Client.pm 1;" p OpenAIAsync::Client .build/kLMGruHLIH/lib/OpenAIAsync/Client.pm 1;" p -OpenAIAsync::Client .build/latest/blib/lib/OpenAIAsync/Client.pm 1;" p -OpenAIAsync::Client .build/latest/lib/OpenAIAsync/Client.pm 1;" p OpenAIAsync::Client .build/mKmyAW37h1/blib/lib/OpenAIAsync/Client.pm 1;" p OpenAIAsync::Client .build/mKmyAW37h1/lib/OpenAIAsync/Client.pm 1;" p OpenAIAsync::Client .build/previous/blib/lib/OpenAIAsync/Client.pm 1;" p @@ -9919,8 +9915,6 @@ OpenAIAsync::Types .build/bgXXjrPaza/blib/lib/OpenAIAsync/Types.pm 1;" p OpenAIAsync::Types .build/bgXXjrPaza/lib/OpenAIAsync/Types.pm 1;" p OpenAIAsync::Types .build/kLMGruHLIH/blib/lib/OpenAIAsync/Types.pm 1;" p OpenAIAsync::Types .build/kLMGruHLIH/lib/OpenAIAsync/Types.pm 1;" p -OpenAIAsync::Types .build/latest/blib/lib/OpenAIAsync/Types.pm 1;" p -OpenAIAsync::Types .build/latest/lib/OpenAIAsync/Types.pm 1;" p OpenAIAsync::Types .build/mKmyAW37h1/blib/lib/OpenAIAsync/Types.pm 1;" p OpenAIAsync::Types .build/mKmyAW37h1/lib/OpenAIAsync/Types.pm 1;" p OpenAIAsync::Types .build/previous/blib/lib/OpenAIAsync/Types.pm 1;" p @@ -9956,8 +9950,6 @@ OpenAIAsync::Types::Requests .build/cD5KaBDsj2/blib/lib/OpenAIAsync/Types/Reques OpenAIAsync::Types::Requests .build/cD5KaBDsj2/lib/OpenAIAsync/Types/Requests.pm 1;" p OpenAIAsync::Types::Requests .build/kLMGruHLIH/blib/lib/OpenAIAsync/Types/Requests.pm 1;" p OpenAIAsync::Types::Requests .build/kLMGruHLIH/lib/OpenAIAsync/Types/Requests.pm 1;" p -OpenAIAsync::Types::Requests .build/latest/blib/lib/OpenAIAsync/Types/Requests.pm 1;" p -OpenAIAsync::Types::Requests .build/latest/lib/OpenAIAsync/Types/Requests.pm 1;" p OpenAIAsync::Types::Requests .build/mKmyAW37h1/blib/lib/OpenAIAsync/Types/Requests.pm 1;" p OpenAIAsync::Types::Requests .build/mKmyAW37h1/lib/OpenAIAsync/Types/Requests.pm 1;" p OpenAIAsync::Types::Requests .build/nb3podVIwj/blib/lib/OpenAIAsync/Types/Requests.pm 1;" p @@ -9997,8 +9989,6 @@ OpenAIAsync::Types::Requests::ChatCompletion::Messages::Union .build/cD5KaBDsj2/ OpenAIAsync::Types::Requests::ChatCompletion::Messages::Union .build/cD5KaBDsj2/lib/OpenAIAsync/Types/Requests.pm 170;" p OpenAIAsync::Types::Requests::ChatCompletion::Messages::Union .build/kLMGruHLIH/blib/lib/OpenAIAsync/Types/Requests.pm 186;" p OpenAIAsync::Types::Requests::ChatCompletion::Messages::Union .build/kLMGruHLIH/lib/OpenAIAsync/Types/Requests.pm 186;" p -OpenAIAsync::Types::Requests::ChatCompletion::Messages::Union .build/latest/blib/lib/OpenAIAsync/Types/Requests.pm 186;" p -OpenAIAsync::Types::Requests::ChatCompletion::Messages::Union .build/latest/lib/OpenAIAsync/Types/Requests.pm 186;" p OpenAIAsync::Types::Requests::ChatCompletion::Messages::Union .build/mKmyAW37h1/blib/lib/OpenAIAsync/Types/Requests.pm 170;" p OpenAIAsync::Types::Requests::ChatCompletion::Messages::Union .build/mKmyAW37h1/lib/OpenAIAsync/Types/Requests.pm 170;" p OpenAIAsync::Types::Requests::ChatCompletion::Messages::Union .build/nb3podVIwj/blib/lib/OpenAIAsync/Types/Requests.pm 170;" p @@ -10037,8 +10027,6 @@ OpenAIAsync::Types::Requests::ChatCompletion::Messages::User::ContentUnion .buil OpenAIAsync::Types::Requests::ChatCompletion::Messages::User::ContentUnion .build/cD5KaBDsj2/lib/OpenAIAsync/Types/Requests.pm 94;" p OpenAIAsync::Types::Requests::ChatCompletion::Messages::User::ContentUnion .build/kLMGruHLIH/blib/lib/OpenAIAsync/Types/Requests.pm 110;" p OpenAIAsync::Types::Requests::ChatCompletion::Messages::User::ContentUnion .build/kLMGruHLIH/lib/OpenAIAsync/Types/Requests.pm 110;" p -OpenAIAsync::Types::Requests::ChatCompletion::Messages::User::ContentUnion .build/latest/blib/lib/OpenAIAsync/Types/Requests.pm 110;" p -OpenAIAsync::Types::Requests::ChatCompletion::Messages::User::ContentUnion .build/latest/lib/OpenAIAsync/Types/Requests.pm 110;" p OpenAIAsync::Types::Requests::ChatCompletion::Messages::User::ContentUnion .build/mKmyAW37h1/blib/lib/OpenAIAsync/Types/Requests.pm 94;" p OpenAIAsync::Types::Requests::ChatCompletion::Messages::User::ContentUnion .build/mKmyAW37h1/lib/OpenAIAsync/Types/Requests.pm 94;" p OpenAIAsync::Types::Requests::ChatCompletion::Messages::User::ContentUnion .build/nb3podVIwj/blib/lib/OpenAIAsync/Types/Requests.pm 94;" p @@ -10077,8 +10065,6 @@ OpenAIAsync::Types::Results .build/cD5KaBDsj2/blib/lib/OpenAIAsync/Types/Results OpenAIAsync::Types::Results .build/cD5KaBDsj2/lib/OpenAIAsync/Types/Results.pm 1;" p OpenAIAsync::Types::Results .build/kLMGruHLIH/blib/lib/OpenAIAsync/Types/Results.pm 1;" p OpenAIAsync::Types::Results .build/kLMGruHLIH/lib/OpenAIAsync/Types/Results.pm 1;" p -OpenAIAsync::Types::Results .build/latest/blib/lib/OpenAIAsync/Types/Results.pm 1;" p -OpenAIAsync::Types::Results .build/latest/lib/OpenAIAsync/Types/Results.pm 1;" p OpenAIAsync::Types::Results .build/mKmyAW37h1/blib/lib/OpenAIAsync/Types/Results.pm 1;" p OpenAIAsync::Types::Results .build/mKmyAW37h1/lib/OpenAIAsync/Types/Results.pm 1;" p OpenAIAsync::Types::Results .build/nb3podVIwj/blib/lib/OpenAIAsync/Types/Results.pm 1;" p @@ -28182,10 +28168,6 @@ new .build/kLMGruHLIH/blib/lib/OpenAIAsync/Types/Requests.pm 113;" s new .build/kLMGruHLIH/blib/lib/OpenAIAsync/Types/Requests.pm 189;" s new .build/kLMGruHLIH/lib/OpenAIAsync/Types/Requests.pm 113;" s new .build/kLMGruHLIH/lib/OpenAIAsync/Types/Requests.pm 189;" s -new .build/latest/blib/lib/OpenAIAsync/Types/Requests.pm 113;" s -new .build/latest/blib/lib/OpenAIAsync/Types/Requests.pm 189;" s -new .build/latest/lib/OpenAIAsync/Types/Requests.pm 113;" s -new .build/latest/lib/OpenAIAsync/Types/Requests.pm 189;" s new .build/mKmyAW37h1/blib/lib/OpenAIAsync/Types/Requests.pm 173;" s new .build/mKmyAW37h1/blib/lib/OpenAIAsync/Types/Requests.pm 97;" s new .build/mKmyAW37h1/lib/OpenAIAsync/Types/Requests.pm 173;" s @@ -29025,8 +29007,6 @@ ontent::new .build/cD5KaBDsj2/blib/lib/OpenAIAsync/Types/Requests.pm 173;" s ontent::new .build/cD5KaBDsj2/lib/OpenAIAsync/Types/Requests.pm 173;" s ontent::new .build/kLMGruHLIH/blib/lib/OpenAIAsync/Types/Requests.pm 189;" s ontent::new .build/kLMGruHLIH/lib/OpenAIAsync/Types/Requests.pm 189;" s -ontent::new .build/latest/blib/lib/OpenAIAsync/Types/Requests.pm 189;" s -ontent::new .build/latest/lib/OpenAIAsync/Types/Requests.pm 189;" s ontent::new .build/mKmyAW37h1/blib/lib/OpenAIAsync/Types/Requests.pm 173;" s ontent::new .build/mKmyAW37h1/lib/OpenAIAsync/Types/Requests.pm 173;" s ontent::new .build/nb3podVIwj/blib/lib/OpenAIAsync/Types/Requests.pm 173;" s @@ -31702,8 +31682,6 @@ y::new .build/cD5KaBDsj2/blib/lib/OpenAIAsync/Types/Requests.pm 97;" s y::new .build/cD5KaBDsj2/lib/OpenAIAsync/Types/Requests.pm 97;" s y::new .build/kLMGruHLIH/blib/lib/OpenAIAsync/Types/Requests.pm 113;" s y::new .build/kLMGruHLIH/lib/OpenAIAsync/Types/Requests.pm 113;" s -y::new .build/latest/blib/lib/OpenAIAsync/Types/Requests.pm 113;" s -y::new .build/latest/lib/OpenAIAsync/Types/Requests.pm 113;" s y::new .build/mKmyAW37h1/blib/lib/OpenAIAsync/Types/Requests.pm 97;" s y::new .build/mKmyAW37h1/lib/OpenAIAsync/Types/Requests.pm 97;" s y::new .build/nb3podVIwj/blib/lib/OpenAIAsync/Types/Requests.pm 97;" s diff --git a/Client.pod b/Client.pod index a07e436..5e724b3 100644 --- a/Client.pod +++ b/Client.pod @@ -58,17 +58,13 @@ it will properly suspend the execution of your program and do something else con =head1 Methods -=over 4 - -=item * new() +=head2 new() Create a new OpenAIAsync::Client. You'll need to register the client with C<< $loop->add($client) >> after creation. -=back +=head3 PARAMETERS -=head2 PARAMETERS - -=over 8 +=over 4 =item * api_base (optional) @@ -135,16 +131,14 @@ A hash ref that gets passed as additional parameters to L's co =back -=over 4 - -=item * completion (deprecated) +=head2 completion (deprecated) Create a request for completion, this takes a prompt and returns a response. See L for exact details. This particular API has been deprecated by OpenAI in favor of doing everything through the chat completion api below. However it is still supported by OpenAI and compatible servers as it's a very simple interface to use -=item * chat +=head2 chat Create a request for the chat completion api. This takes a series of messages and returns a new chat response. See L for exact details. @@ -154,7 +148,7 @@ to set the context for the assistant, followed by the C<"user"> agent type for t To continue the chat, you'd then take the new message and insert it into the list of messages as part of the chat and make a new request with the user's response. I'll be creating a new module that uses this API and helps manage the chat in an easier manner with a few helper functions. -=item * embedding +=head2 embedding Create a request for calculating the embedding of an input. This takes a bit of text and returns a gigantic list of numbers, see L for exact details. @@ -164,24 +158,22 @@ from the training data of the embedding model. You'll want to take the vector and store it in a database that supports vector operations, like PostgreSQL with the L extension. -=item * image_generate +=head2 image_generate Unimplemented, but once present will be used to generate images with Dall-E (or for self hosted, stable diffusion). -=item * text_to_speech +=head2 text_to_speech Unimplemented, but can be used to turn text to speech using whatever algorithms/models are supported. -=item * speech_to_text +=head2 speech_to_text Unimplemented. The opposite of the above. -=item * vision +=head2 vision Unimplemented, I've not investigated this one much yet but I believe it's to get a description of an image and it's contents. -=back - =head1 See Also L, L, L diff --git a/lib/OpenAIAsync/Client.pm b/lib/OpenAIAsync/Client.pm index a07e436..5e724b3 100644 --- a/lib/OpenAIAsync/Client.pm +++ b/lib/OpenAIAsync/Client.pm @@ -58,17 +58,13 @@ it will properly suspend the execution of your program and do something else con =head1 Methods -=over 4 - -=item * new() +=head2 new() Create a new OpenAIAsync::Client. You'll need to register the client with C<< $loop->add($client) >> after creation. -=back +=head3 PARAMETERS -=head2 PARAMETERS - -=over 8 +=over 4 =item * api_base (optional) @@ -135,16 +131,14 @@ A hash ref that gets passed as additional parameters to L's co =back -=over 4 - -=item * completion (deprecated) +=head2 completion (deprecated) Create a request for completion, this takes a prompt and returns a response. See L for exact details. This particular API has been deprecated by OpenAI in favor of doing everything through the chat completion api below. However it is still supported by OpenAI and compatible servers as it's a very simple interface to use -=item * chat +=head2 chat Create a request for the chat completion api. This takes a series of messages and returns a new chat response. See L for exact details. @@ -154,7 +148,7 @@ to set the context for the assistant, followed by the C<"user"> agent type for t To continue the chat, you'd then take the new message and insert it into the list of messages as part of the chat and make a new request with the user's response. I'll be creating a new module that uses this API and helps manage the chat in an easier manner with a few helper functions. -=item * embedding +=head2 embedding Create a request for calculating the embedding of an input. This takes a bit of text and returns a gigantic list of numbers, see L for exact details. @@ -164,24 +158,22 @@ from the training data of the embedding model. You'll want to take the vector and store it in a database that supports vector operations, like PostgreSQL with the L extension. -=item * image_generate +=head2 image_generate Unimplemented, but once present will be used to generate images with Dall-E (or for self hosted, stable diffusion). -=item * text_to_speech +=head2 text_to_speech Unimplemented, but can be used to turn text to speech using whatever algorithms/models are supported. -=item * speech_to_text +=head2 speech_to_text Unimplemented. The opposite of the above. -=item * vision +=head2 vision Unimplemented, I've not investigated this one much yet but I believe it's to get a description of an image and it's contents. -=back - =head1 See Also L, L, L