Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python_open_ai
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
python_open_ai
Commits
4919ed8b
Commit
4919ed8b
authored
Apr 11, 2023
by
lei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
9d4c4bd9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
ai_pyppeteer.py
+2
-0
test.py
+8
-9
No files found.
ai_pyppeteer.py
View file @
4919ed8b
...
@@ -309,6 +309,8 @@ class ToWork:
...
@@ -309,6 +309,8 @@ class ToWork:
change_prompt
=
task
[
'prompt'
]
change_prompt
=
task
[
'prompt'
]
# 图片链接
# 图片链接
prompt_img
=
task
[
'prompt_img'
]
prompt_img
=
task
[
'prompt_img'
]
logger
.
info
(
task
)
logger
.
info
(
task
[
'type'
]
==
1
)
logger
.
info
(
prompt_img
)
logger
.
info
(
prompt_img
)
if
task
[
'type'
]
==
1
and
prompt_img
and
len
(
json
.
loads
(
prompt_img
)):
if
task
[
'type'
]
==
1
and
prompt_img
and
len
(
json
.
loads
(
prompt_img
)):
logger
.
info
(
'带图片任务'
)
logger
.
info
(
'带图片任务'
)
...
...
test.py
View file @
4919ed8b
import
socket
import
socket
import
requests
import
requests
import
json
# 获取本机计算机名称
task
=
{
hostname
=
socket
.
gethostname
()
'type'
:
1
,
# 获取本机ip
'prompt_img'
:
json
.
dumps
([
'1111111'
])
ip
=
socket
.
gethostbyname
(
hostname
)
}
print
(
ip
)
prompt_img
=
task
[
'prompt_img'
]
ip
=
'http://'
+
ip
if
task
[
'type'
]
==
1
and
prompt_img
and
len
(
json
.
loads
(
prompt_img
)):
res
=
requests
.
get
(
ip
)
print
(
'可以执行'
)
print
(
res
)
'192.168.1.51'
'192.168.100.225'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment