mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-15 14:51:19 -08:00
Improve update script
This commit is contained in:
parent
ce539f755d
commit
1c88f71f05
2 changed files with 18 additions and 2 deletions
|
|
@ -2,8 +2,21 @@
|
|||
trap break INT
|
||||
for (( c=0; c<=1000000; c++ ))
|
||||
do
|
||||
echo "UPDATE: a$c"
|
||||
git pull origin main
|
||||
sleep 120
|
||||
echo "UPDATE: b$c"
|
||||
git pull origin main
|
||||
sleep 120
|
||||
echo "UPDATE: c$c"
|
||||
git pull origin main
|
||||
sleep 120
|
||||
echo "UPDATE: d$c"
|
||||
git pull origin main
|
||||
sleep 120
|
||||
echo "UPDATE: #$c"
|
||||
python -m etc.tool.update
|
||||
sleep 600
|
||||
sleep 120
|
||||
done
|
||||
echo "STOPPED."
|
||||
trap - INT
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ class Video(AsyncGeneratorProvider, ProviderModelMixin):
|
|||
yield ContinueResponse("Timeout waiting for Video URL")
|
||||
page = await browser.get(cls.urls[model].format(quote(prompt)))
|
||||
except Exception as e:
|
||||
stop_browser()
|
||||
debug.error(f"Error opening page:", e)
|
||||
if prompt not in RequestConfig.urls:
|
||||
RequestConfig.urls[prompt] = []
|
||||
|
|
@ -138,6 +139,7 @@ class Video(AsyncGeneratorProvider, ProviderModelMixin):
|
|||
await asyncio.sleep(1)
|
||||
response = await RequestConfig.get_response(prompt)
|
||||
if response:
|
||||
stop_browser()
|
||||
yield Reasoning(label="Found", status="")
|
||||
yield response
|
||||
return
|
||||
|
|
@ -219,6 +221,7 @@ class Video(AsyncGeneratorProvider, ProviderModelMixin):
|
|||
await asyncio.sleep(2)
|
||||
response = await RequestConfig.get_response(prompt)
|
||||
if response:
|
||||
stop_browser()
|
||||
yield Reasoning(label="Finished", status="")
|
||||
yield response
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue