Update llama_stack/providers/remote/inference/groq/groq_utils.py

This commit is contained in:
Aidan Do 2024-12-14 16:49:30 +11:00 committed by GitHub
parent b78b9ed4a1
commit ee53eb8691
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,7 +52,7 @@ def convert_chat_completion_request(
# Groq's JSON mode is beta at the time of writing
warnings.warn("response_format is not supported yet")
if request.sampling_params.repetition_penalty:
if request.sampling_params.repetition_penalty != 1.0:
# groq supports frequency_penalty, but frequency_penalty and sampling_params.repetition_penalty
# seem to have different semantics
# frequency_penalty defaults to 0 is a float between -2.0 and 2.0