You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The library provides access to the API of the [OpenAI service](https://openai.com/api/), on the basis of which [ChatGPT](https://openai.com/blog/chatgpt) works and, for example, the generation of images from text using `DALL-E`.
9
-
`Delphi 10.3+` is required to work with the library.
10
-
This library is a `TOpenAI` class for the main TComponent for more convenient work.
12
+
This repositorty contains Swift implementation over [OpenAI](https://beta.openai.com/docs/api-reference/) public API.
11
13
12
14
❗*This is an unofficial library. OpenAI does not provide any official library for Delphi.*
@@ -29,17 +47,27 @@ This library is a `TOpenAI` class for the main TComponent for more convenient wo
29
47
|Moderations|🟢 Done|
30
48
|Engines (Depricated)|🟢 Done|
31
49
32
-
# ⚒️ Installation
50
+
## What is OpenAI
51
+
52
+
OpenAI is a non-profit artificial intelligence research organization founded in San Francisco, California in 2015. It was created with the purpose of advancing digital intelligence in ways that benefit humanity as a whole and promote societal progress. The organization strives to develop AI (Artificial Intelligence) programs and systems that can think, act and adapt quickly on their own – autonomously. OpenAI's mission is to ensure safe and responsible use of AI for civic good, economic growth and other public benefits; this includes cutting-edge research into important topics such as general AI safety, natural language processing, applied reinforcement learning methods, machine vision algorithms etc.
53
+
54
+
>The OpenAI API can be applied to virtually any task that involves understanding or generating natural language or code. We offer a spectrum of models with different levels of power suitable for different tasks, as well as the ability to fine-tune your own custom models. These models can be used for everything from content generation to semantic search and classification.
55
+
56
+
This library provides access to the API of the [OpenAI service](https://openai.com/api/), on the basis of which [ChatGPT](https://openai.com/blog/chatgpt) works and, for example, the generation of images from text using `DALL-E`.
57
+
58
+
## Installation
33
59
34
60
You can install the package from `GetIt`[directly](https://getitnow.embarcadero.com/openai-for-delphi) in the IDE. Or, to use the library, just add the `root` folder to the IDE library path, or your project source path.
35
61
36
-
#🌳 Usage
62
+
##Usage
37
63
38
-
The library needs to be configured with your account's secret key which is available on the [website](https://beta.openai.com/account/api-keys).
64
+
### Initialization
39
65
40
-
Due to the fact that there can be many parameters and not all of them are required, they are configured using an anonymous function.
66
+
To initialize API instance you need to [obtain](https://beta.openai.com/account/api-keys) API token from your Open AI organization.
67
+
68
+
Once you have a token, you can initialize `TOpenAI` class, which is an entry point to the API.
41
69
42
-
**Initialization**
70
+
Due to the fact that there can be many parameters and not all of them are required, they are configured using an anonymous function.
43
71
44
72
```Pascal
45
73
uses OpenAI;
@@ -55,7 +83,10 @@ uses OpenAI;
55
83
var OpenAI: IOpenAI := TOpenAI.Create(API_TOKEN);
56
84
```
57
85
58
-
**Models**
86
+
Once token you posses the token, and the instance is initialized you are ready to make requests.
This library does not require any 3rd party library. It works on recent Delphi versions (10.3+). Althought not fully tested, it should also work on all supported platforms (Windows, Linux, macOS, Android, iOS).
152
194
153
195
Since the library requires your secret API key, it's not recommended you use it on client applications, as your secret key will be exposed, unless you are sure about the security risks.
0 commit comments