Skip to content

Commit f07db11

Browse files
authored
fix: use chat_completion instead of completion when parsing .ask as it uses the chat endpoint (#54)
1 parent 9f5b016 commit f07db11

File tree

1 file changed

+1
-1
lines changed
  • lib/langchainrb_rails/active_record

1 file changed

+1
-1
lines changed

lib/langchainrb_rails/active_record/hooks.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def ask(question, k: 4, &block)
117117
question: question,
118118
k: k,
119119
&block
120-
).completion
120+
).chat_completion
121121
end
122122
end
123123
end

0 commit comments

Comments
 (0)