Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aandrew-me committed Dec 7, 2024
1 parent 30c6df3 commit 6597f17
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
18 changes: 14 additions & 4 deletions providers/koboldai/koboldai_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,21 @@ import (

func TestRequest(t *testing.T) {
resp, err := NewRequest("What is 1+1", structs.Params{
Provider: "koboldai",
Provider: "koboldai",
Temperature: "0.5",
Top_p: "0.5",
Max_length: "300",
Top_p: "0.5",
Max_length: "300",
})

if err != nil {
t.Fatalf("NewRequest returned an error: %v", err)

}

if resp == nil {
t.Fatalf("NewRequest returned a nil response")
}

body, _ := io.ReadAll(resp.Body)

assert := assert.New(t)
Expand All @@ -25,4 +35,4 @@ func TestRequest(t *testing.T) {

assert.Nil(err, "Error should be Nil")
assert.Equal(200, resp.StatusCode, "Response status code should be 200")
}
}
10 changes: 10 additions & 0 deletions providers/phind/phind_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ import (

func TestRequest(t *testing.T) {
resp, err := NewRequest("What is 1+1", structs.Params{})

if err != nil {
t.Fatalf("NewRequest returned an error: %v", err)

}

if resp == nil {
t.Fatalf("NewRequest returned a nil response")
}

body, _ := io.ReadAll(resp.Body)

assert := assert.New(t)
Expand Down

0 comments on commit 6597f17

Please sign in to comment.