Skip to content

Commit 16dfeb2

Browse files
Update base.rb
1 parent 90f8d15 commit 16dfeb2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/langchain/llm/base.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ class Base
2424
# A client for communicating with the LLM
2525
attr_reader :client
2626

27+
# Ensuring backward compatibility after https://github.com/patterns-ai-core/langchainrb/pull/586
28+
# TODO: Delete this method later
29+
def default_dimension
30+
default_dimensions
31+
end
32+
33+
# Returns the number of vector dimensions used by DEFAULTS[:chat_completion_model_name]
34+
#
35+
# @return [Integer] Vector dimensions
2736
def default_dimensions
2837
self.class.const_get(:DEFAULTS).dig(:dimensions)
2938
end

0 commit comments

Comments
 (0)