Skip to content

Commit 6ffb22f

Browse files
authored
add chatlas updates (#310)
* update for new chatlas class * bump version to 0.0.4
1 parent 807b1dc commit 6ffb22f

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

extensions/chat-with-content/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from posit import connect
33
from posit.connect.content import ContentItem
44
from posit.connect.errors import ClientError
5-
from chatlas import ChatAuto, ChatBedrockAnthropic, Turn
5+
from chatlas import ChatAuto, ChatBedrockAnthropic, SystemTurn, UserTurn
66
import markdownify
77
from shiny import App, Inputs, Outputs, Session, ui, reactive, render
88

@@ -292,8 +292,8 @@ async def _():
292292
current_markdown.set(markdown)
293293

294294
chat._turns = [
295-
Turn(role="system", contents=chat.system_prompt),
296-
Turn(role="user", contents=f"<context>{markdown}</context>"),
295+
SystemTurn(chat.system_prompt),
296+
UserTurn(f"<context>{markdown}</context>"),
297297
]
298298

299299
response = await chat.stream_async(

extensions/chat-with-content/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
"tags": ["llm", "shiny", "chat", "python"],
2828
"minimumConnectVersion": "2025.04.0",
2929
"requiredFeatures": ["OAuth Integrations"],
30-
"version": "0.0.3"
30+
"version": "0.0.4"
3131
},
3232
"files": {
3333
"requirements.txt": {
34-
"checksum": "3c0be3849915235fe65fc7d4a7fa0d01"
34+
"checksum": "0c56ba1ce838560d153c50e71dc2b025"
3535
},
3636
".gitignore": {
3737
"checksum": "693ec79eaa892babde62587aaacf0d8b"
@@ -40,7 +40,7 @@
4040
"checksum": "d41d8cd98f00b204e9800998ecf8427e"
4141
},
4242
"app.py": {
43-
"checksum": "ef9cdbc80272b4735cbff3fea733ba52"
43+
"checksum": "c004da6cd26d590b19bc0a2efd486ddf"
4444
},
4545
"helpers.py": {
4646
"checksum": "b18f4bc0072b6e47864670a3174b0cea"

extensions/chat-with-content/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
anthropic[bedrock]>=0.54.0
22
boto3>=1.38.40
3-
chatlas
43
google-genai>=1.22.0
54
markdownify>=1.1.0
65
openai>=1.91.0

0 commit comments

Comments
 (0)