469
470
471
472
473
474
475
476
|
# File 'lib/llm_cost_tracker/integrations/openai.rb', line 469
def create_streaming(*args, **kwargs)
request = LlmCostTracker::Integrations::Openai.request_params(args, kwargs)
LlmCostTracker::Integrations::Openai.enforce_budget!(request: request)
host = LlmCostTracker::Integrations::Openai.client_host_for(self)
collector = LlmCostTracker::Integrations::Openai.stream_collector(request, host: host)
stream = super(*LlmCostTracker::Integrations::Openai.normalize_sdk_args(args, kwargs))
LlmCostTracker::Integrations::Openai.track_stream(stream, collector: collector)
end
|