Skip to content

Commit

Permalink
rename the file containing the default models
Browse files Browse the repository at this point in the history
  • Loading branch information
tcapelle committed Feb 5, 2025
1 parent 7c1ed3a commit 919d0f3
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/scorers/test_similarity_scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest

import weave
from weave.scorers.llm_utils import OPENAI_DEFAULT_EMBEDDING_MODEL
from weave.scorers.default_models import OPENAI_DEFAULT_EMBEDDING_MODEL
from weave.scorers.similarity_scorer import (
EmbeddingSimilarityScorer,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Default model configurations for different LLM providers."""

OPENAI_DEFAULT_MODEL = "gpt-4o"
OPENAI_DEFAULT_EMBEDDING_MODEL = "text-embedding-3-small"
OPENAI_DEFAULT_MODERATION_MODEL = "omni-moderation-latest"
Expand Down
2 changes: 1 addition & 1 deletion weave/scorers/guardrails/prompt_injection_guardrail.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
from pydantic import BaseModel

import weave
from weave.scorers.default_models import OPENAI_DEFAULT_MODEL
from weave.scorers.guardrails.prompts import (
PROMPT_INJECTION_GUARDRAIL_SYSTEM_PROMPT,
PROMPT_INJECTION_SURVEY_PAPER_SUMMARY,
)
from weave.scorers.llm_scorer import LLMScorer
from weave.scorers.llm_utils import OPENAI_DEFAULT_MODEL
from weave.scorers.utils import stringify


Expand Down
2 changes: 1 addition & 1 deletion weave/scorers/hallucination_scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from pydantic import BaseModel, Field

import weave
from weave.scorers.default_models import OPENAI_DEFAULT_MODEL
from weave.scorers.llm_scorer import LLMScorer
from weave.scorers.llm_utils import OPENAI_DEFAULT_MODEL
from weave.scorers.utils import stringify

DEFAULT_HALLUCINATION_SYSTEM_PROMPT = """
Expand Down
2 changes: 1 addition & 1 deletion weave/scorers/moderation_scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from litellm import amoderation

import weave
from weave.scorers.llm_utils import OPENAI_DEFAULT_MODERATION_MODEL
from weave.scorers.default_models import OPENAI_DEFAULT_MODERATION_MODEL


class OpenAIModerationScorer(weave.Scorer):
Expand Down
2 changes: 1 addition & 1 deletion weave/scorers/ragas_scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from pydantic import BaseModel, Field

import weave
from weave.scorers.default_models import OPENAI_DEFAULT_MODEL
from weave.scorers.llm_scorer import LLMScorer
from weave.scorers.llm_utils import OPENAI_DEFAULT_MODEL


class EntityExtractionResponse(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion weave/scorers/similarity_scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pydantic import Field

import weave
from weave.scorers.llm_utils import OPENAI_DEFAULT_EMBEDDING_MODEL
from weave.scorers.default_models import OPENAI_DEFAULT_EMBEDDING_MODEL


class EmbeddingSimilarityScorer(weave.Scorer):
Expand Down
2 changes: 1 addition & 1 deletion weave/scorers/summarization_scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from pydantic import BaseModel, Field

import weave
from weave.scorers.default_models import OPENAI_DEFAULT_MODEL
from weave.scorers.llm_scorer import LLMScorer
from weave.scorers.llm_utils import OPENAI_DEFAULT_MODEL

DEFAULT_EXTRACTION_SYSTEM_PROMPT = """
Given a <text>, extract all the unique entities from the text without repetition.
Expand Down

0 comments on commit 919d0f3

Please sign in to comment.