Skip to content

Commit 07fb9a3

Browse files
Merge pull request #156 from MervinPraison/develop
Upgrading Chainlit to version 1.2.0"
2 parents 760877c + bef3359 commit 07fb9a3

File tree

8 files changed

+979
-889
lines changed

8 files changed

+979
-889
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM python:3.11-slim
22
WORKDIR /app
33
COPY . .
4-
RUN pip install flask praisonai==0.0.68 gunicorn markdown
4+
RUN pip install flask praisonai==0.0.69 gunicorn markdown
55
EXPOSE 8080
66
CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]

docs/api/praisonai/deploy.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ <h2 id="raises">Raises</h2>
110110
file.write(&#34;FROM python:3.11-slim\n&#34;)
111111
file.write(&#34;WORKDIR /app\n&#34;)
112112
file.write(&#34;COPY . .\n&#34;)
113-
file.write(&#34;RUN pip install flask praisonai==0.0.68 gunicorn markdown\n&#34;)
113+
file.write(&#34;RUN pip install flask praisonai==0.0.69 gunicorn markdown\n&#34;)
114114
file.write(&#34;EXPOSE 8080\n&#34;)
115115
file.write(&#39;CMD [&#34;gunicorn&#34;, &#34;-b&#34;, &#34;0.0.0.0:8080&#34;, &#34;api:app&#34;]\n&#39;)
116116

poetry.lock

Lines changed: 954 additions & 880 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

praisonai.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class Praisonai < Formula
33

44
desc "AI tools for various AI applications"
55
homepage "https://github.com/MervinPraison/PraisonAI"
6-
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/0.0.68.tar.gz"
6+
url "https://github.com/MervinPraison/PraisonAI/archive/refs/tags/0.0.69.tar.gz"
77
sha256 "1828fb9227d10f991522c3f24f061943a254b667196b40b1a3e4a54a8d30ce32" # Replace with actual SHA256 checksum
88
license "MIT"
99

praisonai/deploy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create_dockerfile(self):
5656
file.write("FROM python:3.11-slim\n")
5757
file.write("WORKDIR /app\n")
5858
file.write("COPY . .\n")
59-
file.write("RUN pip install flask praisonai==0.0.68 gunicorn markdown\n")
59+
file.write("RUN pip install flask praisonai==0.0.69 gunicorn markdown\n")
6060
file.write("EXPOSE 8080\n")
6161
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
6262

praisonai/ui/code.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,14 @@ async def on_chat_resume(thread: ThreadDict):
299299
thread_id = thread["id"]
300300
cl.user_session.set("thread_id", thread["id"])
301301

302-
# The metadata should now already be a dictionary
302+
# Ensure metadata is a dictionary
303303
metadata = thread.get("metadata", {})
304+
if isinstance(metadata, str):
305+
try:
306+
metadata = json.loads(metadata)
307+
except json.JSONDecodeError:
308+
metadata = {}
309+
304310
cl.user_session.set("metadata", metadata)
305311

306312
message_history = cl.user_session.get("message_history", [])

praisonai/ui/sql_alchemy.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,14 +612,24 @@ async def get_all_user_threads(
612612
for thread in user_threads:
613613
thread_id = thread["thread_id"]
614614
if thread_id is not None:
615+
# Ensure metadata is a dictionary
616+
metadata = thread["thread_metadata"]
617+
if isinstance(metadata, str):
618+
try:
619+
metadata = json.loads(metadata)
620+
except json.JSONDecodeError:
621+
metadata = {}
622+
elif metadata is None:
623+
metadata = {}
624+
615625
thread_dicts[thread_id] = ThreadDict(
616626
id=thread_id,
617627
createdAt=thread["thread_createdat"],
618628
name=thread["thread_name"],
619629
userId=thread["user_id"],
620630
userIdentifier=thread["user_identifier"],
621631
tags=thread["thread_tags"],
622-
metadata=thread["thread_metadata"],
632+
metadata=metadata,
623633
steps=[],
624634
elements=[],
625635
)

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "PraisonAI"
3-
version = "0.0.68"
3+
version = "0.0.69"
44
description = "PraisonAI application combines AutoGen and CrewAI or similar frameworks into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customization, and efficient human-agent collaboration."
55
authors = ["Mervin Praison"]
66
license = ""
@@ -21,7 +21,7 @@ crewai = ">=0.32.0"
2121
markdown = ">=3.5"
2222
praisonai-tools = ">=0.0.7"
2323
pyparsing = ">=3.0.0"
24-
chainlit = {version = "^1.1.404", optional = true}
24+
chainlit = {version = "==1.2.0", optional = true}
2525
gradio = {version = ">=4.26.0", optional = true}
2626
flask = {version = ">=3.0.0", optional = true}
2727
agentops = {version = ">=0.2.6", optional = true}
@@ -70,7 +70,7 @@ mkdocstrings-python = "*"
7070
pdoc3 = "*"
7171
xmlrunner = "*"
7272
unittest2 = "*"
73-
chainlit = "^1.1.404"
73+
chainlit = "==1.2.0"
7474
gradio = ">=4.26.0"
7575
flask = ">=3.0.0"
7676
agentops = ">=0.2.6"

0 commit comments

Comments
 (0)