Skip to content

Commit

Permalink
feat/upd models (#4)
Browse files Browse the repository at this point in the history
* feat: update models #1

* feat: remove deprecated models
  • Loading branch information
sgaunet authored Sep 23, 2024
1 parent 0bb3599 commit 59a106c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
13 changes: 4 additions & 9 deletions perplexity.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,13 @@ func (s *Client) SetModuleLlama31SonarLarge128kOnline() {
}

// SetModuleLlama3SonarLarge32kInstruct sets the model to llama-3-sonar-large-32k-instruct.
func (s *Client) SetModuleLlama38bInstruct() {
s.setModel("llama-3-8b-instruct")
func (s *Client) SetModuleLlama318bInstruct() {
s.setModel("llama-3.1-8b-instruct")
}

// SetModuleLlama370bInstruct sets the model to llama-3-70b-instruct.
func (s *Client) SetModuleLlama370bInstruct() {
s.setModel("llama-3-70b-instruct")
}

// SetModuleMixtral8x7bInstruct sets the model to mixtral-8x7b-instruct.
func (s *Client) SetModuleMixtral8x7bInstruct() {
s.setModel("mixtral-8x7b-instruct")
func (s *Client) SetModuleLlama3170bInstruct() {
s.setModel("llama-3.1-70b-instruct")
}

// SetEndpoint sets the API endpoint.
Expand Down
16 changes: 6 additions & 10 deletions perplexity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,13 @@ func TestSetModels(t *testing.T) {
r.SetModuleLlama31SonarLarge128kOnline()
assert.Equal(t, r.GetModel(), "llama-3.1-sonar-large-128k-online")
})
t.Run("set model llama-3-8b-instruct", func(t *testing.T) {
r.SetModuleLlama38bInstruct()
assert.Equal(t, r.GetModel(), "llama-3-8b-instruct")
t.Run("set model llama-3.1-8b-instruct", func(t *testing.T) {
r.SetModuleLlama318bInstruct()
assert.Equal(t, r.GetModel(), "llama-3.1-8b-instruct")
})
t.Run("set model llama-3-70b-instruct", func(t *testing.T) {
r.SetModuleLlama370bInstruct()
assert.Equal(t, r.GetModel(), "llama-3-70b-instruct")
})
t.Run("set model mixtral-8x7b-instruct", func(t *testing.T) {
r.SetModuleMixtral8x7bInstruct()
assert.Equal(t, r.GetModel(), "mixtral-8x7b-instruct")
t.Run("set model llama-3.1-70b-instruct", func(t *testing.T) {
r.SetModuleLlama3170bInstruct()
assert.Equal(t, r.GetModel(), "llama-3.1-70b-instruct")
})
}

Expand Down

0 comments on commit 59a106c

Please sign in to comment.