|
19 | 19 |
|
20 | 20 | try:
|
21 | 21 | # pydantic v2 import
|
22 |
| - from pydantic import UUID4, BaseModel, ConfigDict, Field |
| 22 | + from pydantic import UUID4, BaseModel, ConfigDict, Field, field_validator |
23 | 23 | from pydantic_settings import BaseSettings, SettingsConfigDict
|
24 | 24 |
|
25 | 25 | pydantic_v2 = True
|
26 | 26 | except ImportError:
|
27 | 27 | # pydantic v1 import
|
28 |
| - from pydantic.v1 import UUID4, BaseModel, BaseSettings, ConfigDict, Field |
| 28 | + from pydantic.v1 import UUID4, BaseModel, BaseSettings, ConfigDict, Field, validator |
29 | 29 |
|
30 | 30 | pydantic_v2 = False
|
31 | 31 |
|
@@ -1468,6 +1468,19 @@ class Word(BaseModel):
|
1468 | 1468 | speaker: Optional[str] = None
|
1469 | 1469 | channel: Optional[str] = None
|
1470 | 1470 |
|
| 1471 | + # This is a workaround to address an issue where sentiment_analysis_results |
| 1472 | + # may return contains sentiments where `start` is null. |
| 1473 | + if pydantic_v2: |
| 1474 | + |
| 1475 | + @field_validator("start", mode="before") |
| 1476 | + def set_start_default(cls, v): |
| 1477 | + return 0 if v is None else v |
| 1478 | + else: |
| 1479 | + |
| 1480 | + @validator("start", pre=True) |
| 1481 | + def set_start_default(cls, v): |
| 1482 | + return 0 if v is None else v |
| 1483 | + |
1471 | 1484 |
|
1472 | 1485 | class UtteranceWord(Word):
|
1473 | 1486 | channel: Optional[str] = None
|
@@ -2031,19 +2044,29 @@ class LemurModel(str, Enum):
|
2031 | 2044 | LeMUR features different model modes that allow you to configure your request to suit your needs.
|
2032 | 2045 | """
|
2033 | 2046 |
|
| 2047 | + claude3_7_sonnet_20250219 = "anthropic/claude-3-7-sonnet" |
| 2048 | + """ |
| 2049 | + Claude 3.7 Sonnet is the most intelligent model to date, providing the highest level of intelligence and capability with toggleable extended thinking. |
| 2050 | + """ |
| 2051 | + |
2034 | 2052 | claude3_5_sonnet = "anthropic/claude-3-5-sonnet"
|
2035 | 2053 | """
|
2036 |
| - Claude 3.5 Sonnet is the most intelligent model to date, outperforming Claude 3 Opus on a wide range of evaluations, with the speed and cost of Claude 3 Sonnet. |
| 2054 | + Claude 3.5 Sonnet is the previous most intelligent model to date, providing high level of intelligence and capability. |
2037 | 2055 | """
|
2038 | 2056 |
|
2039 | 2057 | claude3_opus = "anthropic/claude-3-opus"
|
2040 | 2058 | """
|
2041 | 2059 | Claude 3 Opus is good at handling complex analysis, longer tasks with many steps, and higher-order math and coding tasks.
|
2042 | 2060 | """
|
2043 | 2061 |
|
| 2062 | + claude3_5_haiku_20241022 = "anthropic/claude-3-5-haiku" |
| 2063 | + """ |
| 2064 | + Claude 3.5 Haiku is the fastest model, providing intelligence at blazing speeds. |
| 2065 | + """ |
| 2066 | + |
2044 | 2067 | claude3_haiku = "anthropic/claude-3-haiku"
|
2045 | 2068 | """
|
2046 |
| - Claude 3 Haiku is the fastest model that can execute lightweight actions. |
| 2069 | + Claude 3 Haiku is the fastest and most compact model for near-instant responsiveness. |
2047 | 2070 | """
|
2048 | 2071 |
|
2049 | 2072 | claude3_sonnet = "anthropic/claude-3-sonnet"
|
|
0 commit comments