Create scheduled indexing for knowledge base
agents.evaluation_metrics.scheduled_indexing.create(ScheduledIndexingCreateParams**kwargs) -> ScheduledIndexingCreateResponse
/v2/gen-ai/scheduled-indexing
To create scheduled indexing for a knowledge base, send a POST request to /v2/gen-ai/scheduled-indexing.
Parameters
Days for execution (day is represented same as in a cron expression, e.g. Monday begins with 1 )
knowledge_base_uuid: Optional[str]
Knowledge base uuid for which the schedule is created
time: Optional[str]
Time of execution (HH:MM) UTC
Returns
Create scheduled indexing for knowledge base
from gradient import Gradient
client = Gradient(
access_token="My Access Token",
)
scheduled_indexing = client.agents.evaluation_metrics.scheduled_indexing.create()
print(scheduled_indexing.indexing_info)
{
"indexing_info": {
"created_at": "2023-01-01T00:00:00Z",
"days": [
123
],
"deleted_at": "2023-01-01T00:00:00Z",
"is_active": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"last_ran_at": "2023-01-01T00:00:00Z",
"next_run_at": "2023-01-01T00:00:00Z",
"time": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}Returns Examples
{
"indexing_info": {
"created_at": "2023-01-01T00:00:00Z",
"days": [
123
],
"deleted_at": "2023-01-01T00:00:00Z",
"is_active": true,
"knowledge_base_uuid": "123e4567-e89b-12d3-a456-426614174000",
"last_ran_at": "2023-01-01T00:00:00Z",
"next_run_at": "2023-01-01T00:00:00Z",
"time": "example string",
"updated_at": "2023-01-01T00:00:00Z",
"uuid": "123e4567-e89b-12d3-a456-426614174000"
}
}