Skip to content

Commit

Permalink
Fix names
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkkul committed Aug 29, 2024
1 parent 1cb1230 commit fce0476
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
13 changes: 11 additions & 2 deletions test/collection/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,17 @@ def test_config_with_vectorizer_and_properties(
{"generative-anyscale": {}},
),
(
Configure.Generative.friendliai(temperature=0.5, max_tokens=100, model="model", base_url="https://api.custom.ai"),
{"generative-friendliai": {"temperature": 0.5, "maxTokens": 100, "model": "model", "baseURL": "https://api.custom.ai"}},
Configure.Generative.friendliai(
temperature=0.5, max_tokens=100, model="model", base_url="https://api.custom.ai"
),
{
"generative-friendliai": {
"temperature": 0.5,
"maxTokens": 100,
"model": "model",
"baseURL": "https://api.custom.ai",
}
},
),
(
Configure.Generative.mistral(temperature=0.5, max_tokens=100, model="model"),
Expand Down
8 changes: 5 additions & 3 deletions weaviate/collections/classes/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class GenerativeSearches(str, Enum):
ANTHROPIC = "generative-anthropic"
ANYSCALE = "generative-anyscale"
COHERE = "generative-cohere"
FRIENDLYAI = "generative-friendlyai"
FRIENDLIAI = "generative-friendliai"
MISTRAL = "generative-mistral"
OCTOAI = "generative-octoai"
OLLAMA = "generative-ollama"
Expand Down Expand Up @@ -447,7 +447,7 @@ class _GenerativeMistral(_GenerativeConfigCreate):

class _GenerativeFriendlyai(_GenerativeConfigCreate):
generative: Union[GenerativeSearches, _EnumLikeStr] = Field(
default=GenerativeSearches.FRIENDLYAI, frozen=True, exclude=True
default=GenerativeSearches.FRIENDLIAI, frozen=True, exclude=True
)
temperature: Optional[float]
model: Optional[str]
Expand Down Expand Up @@ -636,7 +636,9 @@ def friendliai(
temperature: Optional[float] = None,
max_tokens: Optional[int] = None,
) -> _GenerativeConfigCreate:
return _GenerativeFriendlyai(model=model, temperature=temperature, maxTokens=max_tokens, baseURL=base_url)
return _GenerativeFriendlyai(
model=model, temperature=temperature, maxTokens=max_tokens, baseURL=base_url
)

@staticmethod
def mistral(
Expand Down

0 comments on commit fce0476

Please sign in to comment.