Skip to content

Commit

Permalink
Fix fields defined with descriptions as default values
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Dec 17, 2024
1 parent a2b98b0 commit 21ba8ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions neon_data_models/models/api/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,10 @@ def validate_inputs(cls, values):


class BrainForgeLLM(BaseModel):
name: str = Field("LLM Name")
version: str = Field("LLM Version")
personas: List[LLMPersona] = Field("List of personas defined in this model")
name: str = Field(description="LLM Name")
version: str = Field(description="LLM Version")
personas: List[LLMPersona] = Field(
default=[], description="List of personas defined in this model")


__all__ = [LLMPersona.__name__, LLMRequest.__name__, LLMResponse.__name__,
Expand Down
6 changes: 4 additions & 2 deletions neon_data_models/models/api/mq/brainforge.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@


class LLMGetModels(MQContext):
user_id: str = Field("ID of user to get models for")
user_id: str = Field(
description="ID of user to get models for")


class LLMGetModelsResponse(MQContext):
models: List[BrainForgeLLM]


class LLMGetPersonas(LLMGetModels):
model_id: str = Field("Model ID (<name>@<version>) to get personas for")
model_id: str = Field(
description="Model ID (<name>@<version>) to get personas for")

@property
def model_name(self):
Expand Down

0 comments on commit 21ba8ee

Please sign in to comment.