lib/gen_ai/language/google_palm.rb in gen-ai-0.3.2 vs lib/gen_ai/language/google_palm.rb in gen-ai-0.4.0.alpha.1
- old
+ new
@@ -24,11 +24,11 @@
raw: { 'data' => responses, 'usage' => {} },
parsed: extract_embeddings(responses)
)
end
- def complete(prompt, options: {})
+ def complete(prompt, options = {})
parameters = build_completion_options(prompt, options)
response = handle_errors { client.generate_text(**parameters) }
build_result(
@@ -36,10 +36,10 @@
raw: response.merge('usage' => {}),
parsed: extract_completions(response)
)
end
- def chat(message, context: nil, history: [], examples: [], options: {})
+ def chat(message, context: nil, history: [], examples: [], **options)
parameters = build_chat_options(message, context, history, examples, options)
response = handle_errors { client.generate_chat_message(**parameters) }
build_result(