Skip to content

Commit

Permalink
Update finetuna.Tests.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Jun 29, 2024
1 parent 9304dd0 commit b0e8222
Showing 1 changed file with 13 additions and 15 deletions.
28 changes: 13 additions & 15 deletions tests/finetuna.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@

BeforeEach {
if (-not $env:OPENAI_API_KEY) {
throw "OPENAI_API_KEY environment variable is not set."
}
Import-Module ./finetuna.psd1
$global:OPENAI_API_KEY = $PSDefaultParameterValues['Initialize-APIKey:ApiKey'] = $env:OPENAI_API_KEY
$script:sampleFilePath = Get-ChildItem -Recurse totbot-tee-tune.jsonl
$splat = @{
ApiType = 'openai'
ApiKey = $env:OPENAI_API_KEY
}
Set-TuneProvider @splat
}

Describe "finetuna Module Tests" {
BeforeEach {
if (-not $env:OPENAI_API_KEY) {
throw "OPENAI_API_KEY environment variable is not set."
}
Import-Module ./finetuna.psd1
$global:OPENAI_API_KEY = $PSDefaultParameterValues['Initialize-APIKey:ApiKey'] = $env:OPENAI_API_KEY
$script:sampleFilePath = Get-ChildItem -Recurse totbot-tee-tune.jsonl
$splat = @{
ApiType = 'openai'
ApiKey = $env:OPENAI_API_KEY
}
Set-TuneProvider @splat
}
Context "Clear-TuneProvider" {
It "Should clear the provider configuration" {
Clear-TuneProvider
Expand Down

0 comments on commit b0e8222

Please sign in to comment.