Download the PHP package angelxmoreno/prompt-classes without Composer

On this page you can find all versions of the php package angelxmoreno/prompt-classes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package prompt-classes

PromptClasses

ChatGpt reusable objects

Installation

Getting started

First thing you will need to get started is an OpenAI api key.

Getting an OpenAI Api Key

To get started, visit the official OpenAI platform website. If you're new, create an account using simple steps. Next, sign in using your OpenAI account email and password, or use your Google/Microsoft account. Once logged in, you'll find your name and profile icon on the top-right corner of the OpenAI platform homepage. To obtain an API Key, click on your name in the top-right corner for a dropdown menu, and select "View API keys." On the resulting page, find the "Create new secret key" option in the center. If you don't have an API key, click this button to generate one. Remember to save the API key immediately, as you won't be able to retrieve it once the window closes.

Simple Hello Prompt

  1. Create a PromptClass

  2. Instantiate and send The order of params is the order of the$promptParamsarray. This means that if you change the$promptParamsfor theHelloPromptclass to['time_of_day','name'];, you would have to call->send()` like so:

SEO Meta DescriptionPrompt

  1. Create a PromptClass

  2. Instantiate and send `

Configuration

Under the hood the library uses orhanerday/open-ai. The default configuration for the calls to OpenAI Chat Completions are:

Name Current Value Info
model gpt-3.5-turbo ID of the model to use. See Model overview for descriptions of them.
temperature 1 What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

To discover more options available take a look at the official documentation for the chat completions endpoint. Values can be updated for your PromptClass by extending the $openaiParams property of the AbstractPrompt class like so:

Requirements

PHP 7.4+

Support

For bugs and feature requests, please use the issues section of this repository.

License

Licensed under the MIT License. Redistributions of the source code included in this repository must retain the copyright notice found in each file.


All versions of prompt-classes with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
ext-json Version *
orhanerday/open-ai Version ^4.7
cakephp/utility Version ^4.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package angelxmoreno/prompt-classes contains the following files

Loading the files please wait ....