Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
objeck authored Mar 4, 2025
1 parent e8419d9 commit 24e4990
Showing 1 changed file with 11 additions and 38 deletions.
49 changes: 11 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,17 @@
## Examples

```ruby
# simple openai and perplexity inference
class Hello {
function : Main(args : String[]) ~ Nil {
"Hello World"PrintLine();
"Καλημέρα κόσμε"PrintLine();
"こんにちは 世界"PrintLine();
}
}
```

```ruby
# openai and perplexity inference
use API.OpenAI, API.OpenAI.Chat, Collection;

class OpenAICompletion {
Expand Down Expand Up @@ -104,23 +114,6 @@ class OpenAICompletion {
}
```

```ruby
# create an image from a prompt
use API.OpenAI, API.OpenAI.FineTuning, System.IO.Filesystem, Data.JSON;

class CreateImage {
function : Main(args : String[]) ~ Nil {
image := Image->Create("Create an image of two old steel gears with a transparent background", token);
if(image <> Nil) {
urls := image->GetUrls();
each(url in urls) {
url->ToString()->PrintLine();
};
};
}
}
```

```ruby
# image identification
use API.Google.Gemini, System.IO.Filesystem;
Expand All @@ -139,26 +132,6 @@ class IdentifyImage {
}
```

```ruby
# tune ML model
use Collection, API.OpenAI, System.IO.Filesystem, Data.JSON, Data.CSV;

class TuneAssist {
function : Main(args : String[]) ~ Nil {
if(args->Size() = 1) {
filename := args[1];
file := API.OpenAI.File->LoadOrCreate(filename, "fine-tune", token);

name := file->GetFilename();
id := file->GetId();
"file='{$name}', id='{$id}'"->PrintLine();
tuning_job := Tuner->Create("gpt-3.5-turbo", id, token);
tuning_job->ToString()->PrintLine();
}
}
}
```

```ruby
# text to speech
use Web.HTTP, Collection, Data.JSON, API.OpenAI.Audio;
Expand Down

0 comments on commit 24e4990

Please sign in to comment.