Skip to content

Commit

Permalink
fix(client): fix https args to tls (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao authored May 13, 2022
1 parent 0da311e commit 65991a3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ An always-online demo server loaded with `ViT-L/14-336px` is there for you to pl
<table>
<tr>
<td> via HTTPS 🔐 </td>
<td> via gRPC ⚡⚡ </td>
<td> via gRPC 🔐⚡⚡ </td>
</tr>
<tr>
<td>
Expand All @@ -65,7 +65,7 @@ curl \
# pip install clip-client
from clip_client import Client

c = Client('grpc://demo-cas.jina.ai:51000')
c = Client('grpcs://demo-cas.jina.ai:2096')

r = c.encode(
[
Expand Down
2 changes: 1 addition & 1 deletion client/clip_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def __init__(self, server: str):
_scheme = 'websocket' # temp fix for the core

if _scheme in ('grpc', 'http', 'websocket'):
_kwargs = dict(host=r.hostname, port=_port, protocol=_scheme, https=_tls)
_kwargs = dict(host=r.hostname, port=_port, protocol=_scheme, tls=_tls)

from jina import Client

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pip install clip-client
```python
from clip_client import Client
c = Client('grpc://demo-cas.jina.ai:51000')
c = Client('grpcs://demo-cas.jina.ai:2096')
r = c.encode(
[
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guides/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ Then call `rank`, you can feed it with multiple Documents as a list:
```python
from clip_client import Client

c = Client(server='grpc://demo-cas.jina.ai:51000')
c = Client(server='grpcs://demo-cas.jina.ai:2096')
r = c.rank([d])

print(r['@m', ['text', 'scores__clip_score__value']])
Expand Down

0 comments on commit 65991a3

Please sign in to comment.