mirror of
https://github.com/karl0ss/ai_image_frame_server.git
synced 2025-09-09 15:53:16 +01:00
Compare commits
No commits in common. "73acc92ee4d0f179ea38818c56bda503021a44e3" and "4ea81daa4774fe4f98c62dd3e431860891ed45e4" have entirely different histories.
73acc92ee4
...
4ea81daa47
@ -1,5 +1,5 @@
|
||||
[tool.bumpversion]
|
||||
current_version = "0.2.5"
|
||||
current_version = "0.2.4"
|
||||
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
|
||||
serialize = ["{major}.{minor}.{patch}"]
|
||||
search = "{current_version}"
|
||||
|
@ -3,7 +3,6 @@ import logging
|
||||
import litellm
|
||||
import nest_asyncio
|
||||
from libs.generic import load_recent_prompts, load_config
|
||||
import re
|
||||
nest_asyncio.apply()
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
@ -75,10 +74,5 @@ def create_prompt_on_openwebui(prompt: str, topic: str = "random") -> str:
|
||||
# api_key=user_config["openwebui"]["api_key"],
|
||||
# )
|
||||
# prompt = response["choices"][0]["message"]["content"].strip('"')
|
||||
match = re.search(r'"([^"]+)"', prompt)
|
||||
if not match:
|
||||
match = re.search(r":\s*\n*\s*(.+)", prompt)
|
||||
if match:
|
||||
prompt = match.group(1)
|
||||
logging.debug(prompt)
|
||||
return prompt
|
||||
return prompt.split(": ")[-1]
|
Loading…
x
Reference in New Issue
Block a user