Skip to content

Commit

Permalink
Updating default open ai model in config and tests (#354)
Browse files Browse the repository at this point in the history
* updating config.yaml comment for available openai llm models

* using gpt-4o-mini as default models for openai tests

* changing default openai model in config.yaml to gpt-4o-mini

* change in comment

* typo

---------

Co-authored-by: bricemacias-rocketcode <[email protected]>
  • Loading branch information
bricemacias and bricemacias-rocketcode authored Aug 14, 2024
1 parent 335d9b7 commit 60a3a11
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
llm:
# openai or anthropic
service: "openai"
# OpenAI: gpt-3.5-turbo, gpt-4, gpt-3.5-turbo-1106, gpt-3.5-turbo-16k, gpt-4-32k, gpt-4o, gpt-4o-2024-08-06, gpt-4o-mini, gpt-4o-mini-2024-07-18; Anthropic: claude-instant-1 or claude-2
model: "gpt-3.5-turbo-1106"
# OpenAI: gpt-3.5-turbo, gpt-4, gpt-3.5-turbo-1106, gpt-3.5-turbo-16k, gpt-4-32k, gpt-4o-mini, gpt-4o-mini-2024-07-18; Anthropic: claude-instant-1 or claude-2
model: "gpt-4o-mini"
## OpenAI-specific settings
# Only used for Azure OpenAI API
azure_openai_endpoint:
Expand All @@ -12,7 +12,7 @@ llm:
azure_openai:
# llm.model name is used as deployment name as reasonable default if not set
# assuming base model is deployed with deployment name matching model name
# llm_deployment: "gpt-3.5-turbo-customname"
# llm_deployment: "gpt-4o-mini-customname"
# embeddings deployment is required when Zep is configured to use OpenAI embeddings
# embedding_deployment: "text-embedding-ada-002-customname"
# Use only with an alternate OpenAI-compatible API endpoint
Expand Down
4 changes: 2 additions & 2 deletions pkg/llms/llm_openai_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
func TestZepOpenAILLM_Init(t *testing.T) {
cfg := &config.Config{
LLM: config.LLM{
Model: "gpt-3.5-turbo",
Model: "gpt-4o-mini",
OpenAIAPIKey: "test-key",
},
}
Expand Down Expand Up @@ -137,7 +137,7 @@ func TestZepOpenAILLM_TestConfigureClient(t *testing.T) {

func TestZepOpenAILLM_Call(t *testing.T) {
cfg := testutils.NewTestConfig()
cfg.LLM.Model = "gpt-3.5-turbo"
cfg.LLM.Model = "gpt-4o-mini"

zllm, err := NewOpenAILLM(context.Background(), cfg)
assert.NoError(t, err, "Expected no error from NewOpenAILLM")
Expand Down
2 changes: 1 addition & 1 deletion pkg/tasks/message_intent_analysis_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func runTestIntentExtractor(t *testing.T, testAppState *models.AppState) {
}

func TestIntentExtractor_Extract_OpenAI(t *testing.T) {
appState.Config.LLM.Model = "gpt-3.5-turbo"
appState.Config.LLM.Model = "gpt-4o-mini"
llmClient, err := llms.NewOpenAILLM(testCtx, appState.Config)
assert.NoError(t, err)
appState.LLMClient = llmClient
Expand Down
2 changes: 1 addition & 1 deletion pkg/tasks/message_summarizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func runTestSummarize(t *testing.T, llmClient models.ZepLLM) {

func TestSummarize_OpenAI(t *testing.T) {
appState.Config.LLM.Service = "openai"
appState.Config.LLM.Model = "gpt-3.5-turbo"
appState.Config.LLM.Model = "gpt-4o-mini"
llmClient, err := llms.NewOpenAILLM(testCtx, appState.Config)
assert.NoError(t, err)
runTestSummarize(t, llmClient)
Expand Down
2 changes: 1 addition & 1 deletion pkg/tasks/message_token_counter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func runTestTokenCountExtractor(

func TestTokenCountExtractor_OpenAI(t *testing.T) {
appState.Config.LLM.Service = "openai"
appState.Config.LLM.Model = "gpt-3.5-turbo"
appState.Config.LLM.Model = "gpt-4o-mini"
llmClient, err := llms.NewOpenAILLM(testCtx, appState.Config)
assert.NoError(t, err)
appState.LLMClient = llmClient
Expand Down
2 changes: 1 addition & 1 deletion pkg/testutils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func testConfigDefaults() (*config.Config, error) {
testConfig := &config.Config{
LLM: config.LLM{
Service: "openai",
Model: "gpt-3.5-turbo-1106",
Model: "gpt-4o-mini",
},
NLP: config.NLP{
ServerURL: "http://localhost:5557",
Expand Down

0 comments on commit 60a3a11

Please sign in to comment.