Skip to content

Commit 172ed58

Browse files
authored
Merge pull request #12 from martinemde/fix-openai-chat-completion
Clarify documentation of openai param in chat_completion
2 parents efdde36 + 5b979fa commit 172ed58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/raix/chat_completion.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ def configuration
6060
# @param params [Hash] The parameters for chat completion.
6161
# @option loop [Boolean] :loop (false) Whether to loop the chat completion after function calls.
6262
# @option params [Boolean] :json (false) Whether to return the parse the response as a JSON object. Will search for <json> tags in the response first, then fall back to the default JSON parsing of the entire response.
63-
# @option params [Boolean] :openai (false) Whether to use OpenAI's API instead of OpenRouter's.
63+
# @option params [String] :openai (nil) If non-nil, use OpenAI with the model specified in this param.
6464
# @option params [Boolean] :raw (false) Whether to return the raw response or dig the text content.
6565
# @option params [Array] :messages (nil) An array of messages to use instead of the transcript.
6666
# @option tools [Array|false] :available_tools (nil) Tools to pass to the LLM. Ignored if nil (default). If false, no tools are passed. If an array, only declared tools in the array are passed.
6767
# @return [String|Hash] The completed chat response.
68-
def chat_completion(params: {}, loop: false, json: false, raw: false, openai: false, save_response: true, messages: nil, available_tools: nil)
68+
def chat_completion(params: {}, loop: false, json: false, raw: false, openai: nil, save_response: true, messages: nil, available_tools: nil)
6969
# set params to default values if not provided
7070
params[:cache_at] ||= cache_at.presence
7171
params[:frequency_penalty] ||= frequency_penalty.presence

0 commit comments

Comments
 (0)