|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace OpenAI\Contracts; |
| 4 | + |
| 5 | +use OpenAI\Resources\Contracts\AudioContract; |
| 6 | +use OpenAI\Resources\Contracts\ChatContract; |
| 7 | +use OpenAI\Resources\Contracts\CompletionsContract; |
| 8 | +use OpenAI\Resources\Contracts\EditsContract; |
| 9 | +use OpenAI\Resources\Contracts\EmbeddingsContract; |
| 10 | +use OpenAI\Resources\Contracts\FilesContract; |
| 11 | +use OpenAI\Resources\Contracts\FineTunesContract; |
| 12 | +use OpenAI\Resources\Contracts\ImagesContract; |
| 13 | +use OpenAI\Resources\Contracts\ModelsContract; |
| 14 | +use OpenAI\Resources\Contracts\ModerationsContract; |
| 15 | + |
| 16 | +interface Client |
| 17 | +{ |
| 18 | + /** |
| 19 | + * Given a prompt, the model will return one or more predicted completions, and can also return the probabilities |
| 20 | + * of alternative tokens at each position. |
| 21 | + * |
| 22 | + * @see https://beta.openai.com/docs/api-reference/completions |
| 23 | + */ |
| 24 | + public function completions(): CompletionsContract; |
| 25 | + |
| 26 | + /** |
| 27 | + * Given a chat conversation, the model will return a chat completion response. |
| 28 | + * |
| 29 | + * @see https://platform.openai.com/docs/api-reference/chat |
| 30 | + */ |
| 31 | + public function chat(): ChatContract; |
| 32 | + |
| 33 | + /** |
| 34 | + * Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. |
| 35 | + * |
| 36 | + * @see https://beta.openai.com/docs/api-reference/embeddings |
| 37 | + */ |
| 38 | + public function embeddings(): EmbeddingsContract; |
| 39 | + |
| 40 | + /** |
| 41 | + * Learn how to turn audio into text. |
| 42 | + * |
| 43 | + * @see https://platform.openai.com/docs/api-reference/audio |
| 44 | + */ |
| 45 | + public function audio(): AudioContract; |
| 46 | + |
| 47 | + /** |
| 48 | + * Given a prompt and an instruction, the model will return an edited version of the prompt. |
| 49 | + * |
| 50 | + * @see https://beta.openai.com/docs/api-reference/edits |
| 51 | + */ |
| 52 | + public function edits(): EditsContract; |
| 53 | + |
| 54 | + /** |
| 55 | + * Files are used to upload documents that can be used with features like Fine-tuning. |
| 56 | + * |
| 57 | + * @see https://beta.openai.com/docs/api-reference/files |
| 58 | + */ |
| 59 | + public function files(): FilesContract; |
| 60 | + |
| 61 | + /** |
| 62 | + * List and describe the various models available in the API. |
| 63 | + * |
| 64 | + * @see https://beta.openai.com/docs/api-reference/models |
| 65 | + */ |
| 66 | + public function models(): ModelsContract; |
| 67 | + |
| 68 | + /** |
| 69 | + * Manage fine-tuning jobs to tailor a model to your specific training data. |
| 70 | + * |
| 71 | + * @see https://beta.openai.com/docs/api-reference/fine-tunes |
| 72 | + */ |
| 73 | + public function fineTunes(): FineTunesContract; |
| 74 | + |
| 75 | + /** |
| 76 | + * Given a input text, outputs if the model classifies it as violating OpenAI's content policy. |
| 77 | + * |
| 78 | + * @see https://beta.openai.com/docs/api-reference/moderations |
| 79 | + */ |
| 80 | + public function moderations(): ModerationsContract; |
| 81 | + |
| 82 | + /** |
| 83 | + * Given a prompt and/or an input image, the model will generate a new image. |
| 84 | + * |
| 85 | + * @see https://beta.openai.com/docs/api-reference/images |
| 86 | + */ |
| 87 | + public function images(): ImagesContract; |
| 88 | +} |
0 commit comments