Skip to content

Commit

Permalink
Update: response list instead of single object when fetch sample on z… (
Browse files Browse the repository at this point in the history
#623)

…apier trigger
  • Loading branch information
beastoin authored Aug 19, 2024
2 parents aa2b6be + a8bc5ba commit 7ca92b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/example/zapier/memory_created.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import List
from fastapi import HTTPException, Request, APIRouter, Form
from fastapi.responses import HTMLResponse
from fastapi.templating import Jinja2Templates
Expand Down Expand Up @@ -109,7 +110,7 @@ async def unsubscribe_zapier_trigger(subscriber: ZapierSubcribeModel, uid: str):
return {}


@router.get('/zapier/trigger/memory/sample', tags=['zapier'], response_model=ZapierCreateMemory)
@router.get('/zapier/trigger/memory/sample', tags=['zapier'], response_model=List[ZapierCreateMemory])
async def get_trigger_memory_sample(request: Request, uid: str):
"""
Get the latest memory or a sample to fullfill the triggers On memory created
Expand Down Expand Up @@ -161,7 +162,7 @@ async def get_trigger_memory_sample(request: Request, uid: str):
overview=memory.structured.overview,
)

return sample
return [sample]


@router.get('/zapier/me', tags=['zapier'], response_model=EndpointResponse)
Expand Down

0 comments on commit 7ca92b0

Please sign in to comment.