forked from StartAutomating/PowerShellAI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOpenAIUri.tests.ps1
51 lines (35 loc) · 1.53 KB
/
OpenAIUri.tests.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Import-Module "$PSScriptRoot\..\PowerShellAI.psd1" -Force
Describe "OpenAIUri" -Tag 'OpenAIUri' {
It "Should return the OpenAI URI" {
$actual = Get-OpenAIBaseRestURI
$actual | Should -Be 'https://api.openai.com/v1'
}
It "Should return the OpenAI Models URI" {
$actual = Get-OpenAIModelsURI
$actual | Should -Be 'https://api.openai.com/v1/models'
}
It "Should return the OpenAI Moderations URI" {
$actual = Get-OpenAIModerationsURI
$actual | Should -Be 'https://api.openai.com/v1/moderations'
}
It "Should return the OpenAI Completions URI" {
$actual = Get-OpenAICompletionsURI
$actual | Should -Be 'https://api.openai.com/v1/completions'
}
It "Should return the OpenAI Images Generations URI" {
$actual = Get-OpenAIImagesGenerationsURI
$actual | Should -Be 'https://api.openai.com/v1/images/generations'
}
It "Should return the OpenAI Edit URI" {
$actual = Get-OpenAIEditsURI
$actual | Should -Be 'https://api.openai.com/v1/edits'
}
It "Should return the OpenAI Chat URI" {
$actual = Get-OpenAIChatCompletionUri
$actual | Should -Be 'https://api.openai.com/v1/chat/completions'
}
It "Should return the OpenAI Embedding URI" {
$actual = Get-OpenAIEmbeddingsUri
$actual | Should -Be 'https://api.openai.com/v1/embeddings'
}
}