Skip to content

Commit

Permalink
Merge pull request #925 from PrefectHQ/gpt-4o
Browse files Browse the repository at this point in the history
Use gpt-4o by default
  • Loading branch information
jlowin authored May 14, 2024
2 parents aedfb95 + a7070ea commit 884d961
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cookbook/_archive/docs_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from marvin.beta.applications import Application

# marvin.settings.log_level = "DEBUG"
marvin.settings.openai.chat.completions.model = "gpt-4-1106-preview"
marvin.settings.openai.chat.completions.model = "gpt-4o"


ROOT_DIR = Path(marvin.__file__).parents[2]
Expand Down
2 changes: 1 addition & 1 deletion cookbook/_archive/test_writing_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from pydantic import BaseModel, Field

marvin.settings.log_level = "DEBUG"
marvin.settings.llm_model = "gpt-4"
marvin.settings.llm_model = "gpt-4o"


class TestWriterState(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion cookbook/flows/github_digest/repo_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async def daily_github_digest(
contributors_activity=await data_future.result(),
)

marvin.settings.openai.chat.completions.model = "gpt-4"
marvin.settings.openai.chat.completions.model = "gpt-4o"

epic_story = write_a_tasteful_epic(markdown_digest)

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/configuration/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Please set Marvin specific settings in `~/.marvin/.env`. One exception being `OP
For example, in your `~/.marvin/.env` file you could have:
```shell
MARVIN_LOG_LEVEL=INFO
MARVIN_CHAT_COMPLETIONS_MODEL=gpt-4
MARVIN_CHAT_COMPLETIONS_MODEL=gpt-4o
MARVIN_OPENAI_API_KEY='sk-my-api-key'
```
Settings these values will let you avoid setting an API key every time.
Expand All @@ -24,7 +24,7 @@ A runtime settings object is accessible via `marvin.settings` and can be used to
```python
import marvin

marvin.settings.openai.chat.completions.model = 'gpt-4'
marvin.settings.openai.chat.completions.model = 'gpt-4o'
```

## Settings for using Azure OpenAI models
Expand Down
6 changes: 3 additions & 3 deletions src/marvin/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ChatCompletionSettings(MarvinSettings):
model_config = SettingsConfigDict(
env_prefix="marvin_chat_completions_", extra="ignore"
)
model: str = Field(description="The default chat model to use.", default="gpt-4")
model: str = Field(description="The default chat model to use.", default="gpt-4o")

temperature: float = Field(description="The default temperature to use.", default=1)

Expand Down Expand Up @@ -117,13 +117,13 @@ class AssistantSettings(MarvinSettings):
"""Settings for the assistant API.
Attributes:
model: The default assistant model to use, defaults to `gpt-4-1106-preview`.
model: The default assistant model to use
"""

model_config = SettingsConfigDict(env_prefix="marvin_assistant_")

model: str = Field(
default="gpt-4-1106-preview",
default="gpt-4o",
description="The default assistant model to use.",
)

Expand Down
2 changes: 1 addition & 1 deletion src/marvin/utilities/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def assert_equal(
assert result.is_equal, assert_msg


@marvin.fn(model_kwargs=dict(model="gpt-4-1106-preview"))
@marvin.fn(model_kwargs=dict(model="gpt-4o"))
def _assert_equal(
llm_output: Any, expected: Any, instructions: str = None
) -> Assertion:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_speech_settings_default(self):
class TestAssistantSettings:
def test_assistant_settings_default(self):
settings = AssistantSettings()
assert settings.model == "gpt-4-1106-preview"
assert settings.model == "gpt-4o"


class TestTemporarySettings:
Expand Down

0 comments on commit 884d961

Please sign in to comment.