Skip to content

Commit

Permalink
make actions trigger thread persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
willydouhard committed Apr 8, 2024
1 parent 7a05e0f commit a2ccc09
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -8,6 +8,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

Nothing unreleased!

## [1.0.502] - 2024-04-08

### Added

- Actions now trigger conversation persistence

## [1.0.501] - 2024-04-08

### Added
Expand Down
3 changes: 3 additions & 0 deletions backend/chainlit/socket.py
Expand Up @@ -276,6 +276,9 @@ async def call_action(sid, action):
action = Action(**action)

try:
if not context.session.has_first_interaction:
context.session.has_first_interaction = True
asyncio.create_task(context.emitter.init_thread(action.name))
res = await process_action(action)
await context.emitter.send_action_response(
id=action.id, status=True, response=res if isinstance(res, str) else None
Expand Down
2 changes: 1 addition & 1 deletion backend/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "chainlit"
version = "1.0.501"
version = "1.0.502"
keywords = ['LLM', 'Agents', 'gen ai', 'chat ui', 'chatbot ui', 'openai', 'copilot', 'langchain', 'conversational ai']
description = "Build Conversational AI."
authors = ["Chainlit"]
Expand Down

0 comments on commit a2ccc09

Please sign in to comment.