alert me via sentry
This commit is contained in:
parent
b191d72d12
commit
7293c979df
@ -2,6 +2,7 @@ import os
|
|||||||
import traceback
|
import traceback
|
||||||
from fastapi import APIRouter, WebSocket
|
from fastapi import APIRouter, WebSocket
|
||||||
import openai
|
import openai
|
||||||
|
import sentry_sdk
|
||||||
from config import ANTHROPIC_API_KEY, IS_PROD, SHOULD_MOCK_AI_RESPONSE
|
from config import ANTHROPIC_API_KEY, IS_PROD, SHOULD_MOCK_AI_RESPONSE
|
||||||
from custom_types import InputMode
|
from custom_types import InputMode
|
||||||
from llm import (
|
from llm import (
|
||||||
@ -191,6 +192,10 @@ async def stream_code(websocket: WebSocket):
|
|||||||
original_imported_code, valid_stack
|
original_imported_code, valid_stack
|
||||||
)
|
)
|
||||||
for index, text in enumerate(params["history"][1:]):
|
for index, text in enumerate(params["history"][1:]):
|
||||||
|
# TODO: Remove after "Select and edit" is fully implemented
|
||||||
|
if "referring to this element specifically" in text:
|
||||||
|
sentry_sdk.capture_exception(Exception("Point and edit used"))
|
||||||
|
|
||||||
if index % 2 == 0:
|
if index % 2 == 0:
|
||||||
message: ChatCompletionMessageParam = {
|
message: ChatCompletionMessageParam = {
|
||||||
"role": "user",
|
"role": "user",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user