Skip to content

Commit

Permalink
Don't fail if model configuration is not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
ljuti committed Sep 4, 2023
1 parent 5b1a16d commit 7d5a009
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/roseflow/ai/models/openai_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def call(operation, options, &block)

def chat(options, &block)
response = @model.chat(options.delete(:messages), options, &block)
publish_api_usage(response.usage) if @configuration.instrumentation
publish_api_usage(response.usage) if @configuration&.instrumentation
response
end

Expand Down

0 comments on commit 7d5a009

Please sign in to comment.