Skip to content

Conversation

PopescuTudor
Copy link
Collaborator

No description provided.

@PopescuTudor PopescuTudor self-assigned this Oct 8, 2025
@github-actions github-actions bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository labels Oct 8, 2025
@PopescuTudor PopescuTudor force-pushed the fix/create-cgi-use-pydantic-models branch from 107b8f8 to 72d2555 Compare October 10, 2025 06:48
@PopescuTudor PopescuTudor force-pushed the fix/create-cgi-use-pydantic-models branch from 72d2555 to a62d157 Compare October 10, 2025 06:57
Comment on lines +100 to +103
class Config:
"""Pydantic configuration."""

populate_by_name = True
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let s follow the same pattern we use in other aread of the code

Suggested change
class Config:
"""Pydantic configuration."""
populate_by_name = True
model_config = ConfigDict(populate_by_name=True)


if cron_expression:
data_source["indexer"] = {
data_source_dict["indexer"] = {
Copy link
Contributor

@radu-mocanu radu-mocanu Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don t we create a model for this and add it as an optional member of DataSourceBase?

class Indexer(BaseModel):
     model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)

   cron_expression: str
   time_zone_id: str
   
   @model_validator(mode = 'before')
   def validate():
     ... #we can even add a cron expression validator here 
class BaseSourceConfig(BaseModel):
   indexer: Optional[Indexer] = None
   ...


name: str = Field(description="Index name")
description: str = Field(default="", description="Index description")
data_source: Dict[str, Any] = Field(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let s use the DataSourceBase here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-llamaindex Triggers tests in the uipath-llamaindex-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants