Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module Fixtures #1078

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker/Dockerfile_action_server
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN python -m pip install websockets==9.1
RUN python -m pip install aiohttp==3.8.0
RUN python -m pip install json2html
RUN python -m pip install numpy==1.22.0
RUN python -m pip install croniter
RUN python -m pip install ujson==5.1.0
RUN python -m pip install Pillow==9.0.0
RUN python -m pip install blinker
Expand Down
2 changes: 1 addition & 1 deletion kairon/api/app/routers/bot/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ async def train(

@router.post("/abort/{event_type}", response_model=Response)
async def abort_event(
event_type: EventClass = Path(description="Event type", example=[e.value for e in EventClass]),
event_type: EventClass = Path(default=None, description="Event type", example=[e.value for e in EventClass]),
current_user: User = Security(Authentication.get_current_user_and_bot, scopes=DESIGNER_ACCESS),
):
"""
Expand Down
6 changes: 3 additions & 3 deletions kairon/events/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def index():
def add_event(
request: EventRequest,
is_scheduled: bool = Query(description="Whether the event is to be run once or scheduled"),
event_type: EventClass = Path(description="Event type", example=[e.value for e in EventClass])
event_type: EventClass = Path(default=None, description="Event type", example=[e.value for e in EventClass])
):
request.validate_request(is_scheduled, event_type)
response, message = EventUtility.add_job(event_type, request.dict(), is_scheduled)
Expand All @@ -132,13 +132,13 @@ def add_event(
def update_scheduled_event(
request: EventRequest,
is_scheduled: bool = Query(description="Whether the event is to be run once or scheduled"),
event_type: EventClass = Path(description="Event type", example=[e.value for e in EventClass])
event_type: EventClass = Path(default=None, description="Event type", example=[e.value for e in EventClass])
):
request.validate_request(is_scheduled, event_type)
response, message = EventUtility.update_job(event_type, request.dict(), is_scheduled)
return {"data": response, "message": message}


@app.delete("/api/events/{event_id}", response_model=Response)
def delete_scheduled_event(event_id: Text = Path(description="Event id")):
def delete_scheduled_event(event_id: Text = Path(default=None, description="Event id")):
return {"data": KScheduler().delete_job(event_id), "message": "Scheduled event deleted!"}
Loading