Skip to content

Commit

Permalink
commit tests with mentioned error
Browse files Browse the repository at this point in the history
  • Loading branch information
e19166 committed Aug 14, 2024
1 parent 41ab59c commit 40ae0db
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 30 deletions.
2 changes: 1 addition & 1 deletion ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
distribution = "2201.9.2"
distribution = "2201.9.3"
org = "ballerinax"
name = "openai.audio"
version = "1.0.5"
Expand Down
28 changes: 5 additions & 23 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@

[ballerina]
dependencies-toml-version = "2"
distribution-version = "2201.9.2"
distribution-version = "2201.9.3"

[[package]]
org = "ballerina"
name = "auth"
version = "2.11.1"
version = "2.11.2"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "jballerina.java"},
Expand Down Expand Up @@ -96,14 +96,11 @@ modules = [
[[package]]
org = "ballerina"
name = "io"
version = "1.6.0"
version = "1.6.1"
dependencies = [
{org = "ballerina", name = "jballerina.java"},
{org = "ballerina", name = "lang.value"}
]
modules = [
{org = "ballerina", packageName = "io", moduleName = "io"}
]

[[package]]
org = "ballerina"
Expand Down Expand Up @@ -315,34 +312,19 @@ modules = [
{org = "ballerinai", packageName = "observe", moduleName = "observe"}
]

[[package]]
org = "ballerinax"
name = "openai.audio"
version = "1.0.5"
dependencies = [
{org = "ballerina", name = "http"},
{org = "ballerina", name = "mime"},
{org = "ballerina", name = "url"},
{org = "ballerinai", name = "observe"}
]
modules = [
{org = "ballerinax", packageName = "openai.audio", moduleName = "openai.audio"}
]

[[package]]
org = "wishulaj"
name = "Audio"
version = "0.1.0"
dependencies = [
{org = "ballerina", name = "constraint"},
{org = "ballerina", name = "http"},
{org = "ballerina", name = "io"},
{org = "ballerina", name = "mime"},
{org = "ballerina", name = "test"},
{org = "ballerina", name = "url"},
{org = "ballerinai", name = "observe"},
{org = "ballerinax", name = "openai.audio"}
{org = "ballerinai", name = "observe"}
]
modules = [
{org = "wishulaj", packageName = "Audio", moduleName = "Audio"}
]

11 changes: 5 additions & 6 deletions ballerina/tests/tests.bal
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,18 @@ isolated function testCreateSpeech() returns error? {


@test:Config {
enable:false
enable:false,
groups: ["live_tests", "mock_tests"]
}
isolated function testCreateTranscription() returns error? {
CreateTranscriptionRequest payload = {
file: {fileContent: content1, fileName: "./speech.mp3"},
model: "whisper-1",
response_format: "verbose_json"
};
model: "whisper-1"
};
map<string> headers = {
"Content-Type": mime:MULTIPART_FORM_DATA
};

CreateTranscriptionResponse result = check openAIAudio->/audio/transcriptions.post(payload, headers);
test:assertEquals(result.text, "The quick brown fox jumped over the lazy dog.");
test:assertEquals(result.text, "The");
}

0 comments on commit 40ae0db

Please sign in to comment.