Skip to content

Commit

Permalink
added PINECONE_TYPE
Browse files Browse the repository at this point in the history
  • Loading branch information
glorenzo972 committed May 20, 2024
1 parent a9be062 commit cd5fa6c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tilellm/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,14 @@ async def create_scrape_item_single(item: ItemSingle, redis_client: aioredis.cli

logger.error(f"Error {add_to_queue}")
import traceback
if webhook:
res = PineconeIndexingResult(id=item.id, status=400, error=repr(e))
async with aiohttp.ClientSession() as session:
response = await session.post(webhook, json=res.model_dump(exclude_none=True),
headers={"Content-Type": "application/json", "X-Auth-Token": token})
logger.error(response)
logger.error(f"{await response.json()}")
logger.error(f"Error {e}, webhook: {webhook}")
# if webhook:
# res = PineconeIndexingResult(id=item.id, status=400, error=repr(e))
# async with aiohttp.ClientSession() as session:
# response = await session.post(webhook, json=res.model_dump(exclude_none=True),
# headers={"Content-Type": "application/json", "X-Auth-Token": token})
# logger.error(response)
# logger.error(f"{await response.json()}")
# logger.error(f"Error {e}, webhook: {webhook}")
traceback.print_exc()
logger.error(e)
raise HTTPException(status_code=400, detail=repr(e))
Expand Down

0 comments on commit cd5fa6c

Please sign in to comment.