File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 12
12
from sentry_sdk .utils import logger , capture_internal_exceptions
13
13
14
14
try :
15
- from openai .types .chat import ChatCompletionChunk
16
15
from openai .resources .chat .completions import Completions
17
16
from openai .resources import Embeddings
18
17
19
18
if TYPE_CHECKING :
20
- from openai .types .chat import ChatCompletionMessageParam
19
+ from openai .types .chat import ChatCompletionMessageParam , ChatCompletionChunk
21
20
except ImportError :
22
21
raise DidNotEnable ("OpenAI not installed" )
23
22
@@ -129,7 +128,7 @@ def new_chat_completion(*args, **kwargs):
129
128
kwargs ["messages" ] = list (kwargs ["messages" ])
130
129
messages = kwargs ["messages" ]
131
130
model = kwargs .get ("model" )
132
- streaming = kwargs .get ("stream" ) # TODO handle streaming
131
+ streaming = kwargs .get ("stream" )
133
132
134
133
span = hub .start_span (op = "openai" , description = "Chat Completion" )
135
134
span .__enter__ ()
You can’t perform that action at this time.
0 commit comments