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 committed 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
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
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
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
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.