Skip to content

Commit

Permalink
fix: rstrip endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiniuYu committed Jul 20, 2022
1 parent cc82b22 commit af6c80f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/clip_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def _get_post_payload(self, content, kwargs):
parameters = kwargs.get('parameters', {})
model_name = parameters.get('model', '')
payload = dict(
on=f'/encode/{model_name}',
on=f'/encode/{model_name}'.rstrip('/'),
inputs=self._iter_doc(content),
request_size=kwargs.get('batch_size', 8),
total_docs=len(content) if hasattr(content, '__len__') else None,
Expand Down Expand Up @@ -373,7 +373,7 @@ def _get_rank_payload(self, content, kwargs):
parameters = kwargs.get('parameters', {})
model_name = parameters.get('model', '')
payload = dict(
on=f'/encode/{model_name}',
on=f'/rank/{model_name}'.rstrip('/'),
inputs=self._iter_rank_docs(
content, _source=kwargs.get('source', 'matches')
),
Expand Down

0 comments on commit af6c80f

Please sign in to comment.