From 65991a3f9126b19c99f21e44cd3dd4227cbe80c7 Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Fri, 13 May 2022 11:23:37 +0200 Subject: [PATCH] fix(client): fix https args to tls (#722) --- README.md | 4 ++-- client/clip_client/client.py | 2 +- docs/index.md | 2 +- docs/user-guides/client.md | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1f338c879..c24a4eb88 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ An always-online demo server loaded with `ViT-L/14-336px` is there for you to pl - +
via HTTPS ๐Ÿ” via gRPC โšกโšก via gRPC ๐Ÿ”โšกโšก
@@ -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( [ diff --git a/client/clip_client/client.py b/client/clip_client/client.py index 1ff72261a..f64cd5c0b 100644 --- a/client/clip_client/client.py +++ b/client/clip_client/client.py @@ -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 diff --git a/docs/index.md b/docs/index.md index d76dbb623..3f600bd0d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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( [ diff --git a/docs/user-guides/client.md b/docs/user-guides/client.md index da05350a5..b7f7e7561 100644 --- a/docs/user-guides/client.md +++ b/docs/user-guides/client.md @@ -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']])