Class: RubyLLM::Connection
- Inherits:
-
Object
- Object
- RubyLLM::Connection
- Defined in:
- lib/swarm_sdk/ruby_llm_patches/connection_patch.rb
Class Method Summary collapse
-
.basic ⇒ Object
Override basic to use net_http adapter This avoids async-http SSL/IPv6 issues for simple API calls.
Class Method Details
.basic ⇒ Object
Override basic to use net_http adapter This avoids async-http SSL/IPv6 issues for simple API calls
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/swarm_sdk/ruby_llm_patches/connection_patch.rb', line 14 def basic(&) Faraday.new do |f| f.response( :logger, RubyLLM.logger, bodies: false, response: false, errors: true, headers: false, log_level: :debug, ) f.response(:raise_error) yield f if block_given? # Use net_http for simple API calls to avoid async-http SSL/IPv6 issues f.adapter(:net_http) end end |