Skip to content

Commit

Permalink
Add stop sequence support to MistralClient (#3120)
Browse files Browse the repository at this point in the history
  • Loading branch information
yifanmai authored Oct 31, 2024
1 parent 7c3c6fb commit 712ac23
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/helm/clients/mistral_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class MistralAIRequest(TypedDict):
temperature: float
top_p: float
random_seed: Optional[int]
stop: Optional[List[str]]


class MistralAIClient(CachingClient):
Expand Down Expand Up @@ -120,6 +121,7 @@ def make_request(self, request: Request) -> RequestResult:
"temperature": request.temperature,
"top_p": request.top_p,
"random_seed": self._get_random_seed(request, completion_index),
"stop": request.stop_sequences or None,
}

def do_it() -> Dict[str, Any]:
Expand Down

0 comments on commit 712ac23

Please sign in to comment.