File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
3- # This is an override of the RubyLLM::Chat class to convient methods for easy MCP support
3+ # This is an override of the RubyLLM::Chat class to add convenient methods to more
4+ # easily work with the MCP clients.
45module RubyLLM
56 class Chat
67 def with_resources ( *resources , **args )
Original file line number Diff line number Diff line change 44require "zeitwerk"
55require_relative "chat"
66
7- loader = Zeitwerk ::Loader . for_gem_extension ( RubyLLM )
8- loader . inflector . inflect ( "mcp" => "MCP" )
9- loader . inflector . inflect ( "sse" => "SSE" )
10- loader . inflector . inflect ( "openai" => "OpenAI" )
11- loader . inflector . inflect ( "streamable_http" => "StreamableHTTP" )
12- loader . setup
13-
147module RubyLLM
158 module MCP
169 module_function
@@ -41,3 +34,11 @@ def logger
4134 end
4235 end
4336end
37+
38+ loader = Zeitwerk ::Loader . for_gem_extension ( RubyLLM )
39+ loader . inflector . inflect ( "mcp" => "MCP" )
40+ loader . inflector . inflect ( "sse" => "SSE" )
41+ loader . inflector . inflect ( "openai" => "OpenAI" )
42+ loader . inflector . inflect ( "streamable_http" => "StreamableHTTP" )
43+
44+ loader . setup
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
3333
3434 # Specify which files should be added to the gem when it is released.
3535 # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
36- spec . files = Dir . glob ( "lib/**/*" ) + [ "README.md" , "LICENSE" ]
36+ spec . files = Dir . glob ( "lib/ruby_llm/ **/*" ) + [ "README.md" , "LICENSE" ]
3737 spec . require_paths = [ "lib" ]
3838
3939 spec . add_dependency "httpx" , "~> 1.4"
You can’t perform that action at this time.
0 commit comments