Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
azure-open-ai-embeddings-sales
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 602e8f3e
authored
Feb 24, 2024
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
开发对练
1 parent
1870996f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
code/Sales_FastApi.py
code/test/client.py
code/Sales_FastApi.py
View file @
602e8f3
...
...
@@ -327,9 +327,9 @@ def api_start(host, port):
if
__name__
==
"__main__"
:
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"--host"
,
type
=
str
,
default
=
"192.168.3.191"
)
#
parser.add_argument("--host", type=str, default="192.168.3.191")
# parser.add_argument("--host", type=str, default="127.0.0.1")
#
parser.add_argument("--host", type=str, default="0.0.0.0")
parser
.
add_argument
(
"--host"
,
type
=
str
,
default
=
"0.0.0.0"
)
parser
.
add_argument
(
"--port"
,
type
=
int
,
default
=
7864
)
args
=
parser
.
parse_args
()
api_start
(
args
.
host
,
args
.
port
)
...
...
code/test/client.py
View file @
602e8f3
...
...
@@ -7,9 +7,9 @@ import time
import
websockets
async
def
websocket_client
():
#
uri = "ws://127.0.0.1:7801/ws/1"
uri
=
"ws://127.0.0.1:7801/ws/1"
# uri = "ws://192.168.3.191:7864/ws/1"
uri
=
"ws://127.0.0.1:7864/ws1/1"
#
uri = "ws://127.0.0.1:7864/ws1/1"
# async with websockets.connect(uri) as websocket:
async
with
websockets
.
connect
(
uri
=
uri
)
as
websocket
:
# 发送消息到服务器
...
...
@@ -29,7 +29,7 @@ async def websocket_client_01():
# uri = "ws://127.0.0.1:7801/ws/1"
# uri = "ws://192.168.3.191:7864/ws/1"
uri
=
"ws://192.168.3.191:7864/ws1/1"
#
uri = "ws://127.0.0.1:7864/ws1/1"
uri
=
"ws://127.0.0.1:7864/ws1/1"
# uri = "ws://127.0.0.1:7864/ws/1"
# async with websockets.connect(uri) as websocket:
async
with
websockets
.
connect
(
uri
=
uri
)
as
websocket
:
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment