Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Bug: Chainlit Integration #9057

Open
samelhousseini opened this issue Oct 2, 2024 · 0 comments
Open

Python: Bug: Chainlit Integration #9057

samelhousseini opened this issue Oct 2, 2024 · 0 comments
Assignees
Labels
bug Something isn't working python Pull requests for the Python Semantic Kernel

Comments

@samelhousseini
Copy link

Describe the bug
When integration SK with Chainlit as UI, the app exits right away with the error TypeError: cannot pickle '_thread.RLock' object

To Reproduce
Steps to reproduce the behavior:

  1. Create a test.py file, that imports your orchestrator or SK app
  2. In test.py, import chainlit package
  3. Run test.py, with chainlit run test.py
  4. See error

Expected behavior
Chainlit should be able to run as expected with SK imports

Platform

  • OS: Windows
  • IDE: Code
  • Language: Python
  • Source: SK 1.10.1

sk-bug.txt

Additional context
Downgrading Pydantic doesn't work. The only way this might work is to mount the chainlit through FastAPI, but that limits Chainlit capabilites significantly:

from fastapi import FastAPI
from chainlit.utils import mount_chainlit
from chainlit.context import init_http_context
import chainlit as cl

# Command to start is uvicorn main:app --host 127.0.0.1 --port 80
app = FastAPI()

mount_chainlit(app=app, target="chat.py", path="")
@samelhousseini samelhousseini added the bug Something isn't working label Oct 2, 2024
@markwallace-microsoft markwallace-microsoft added python Pull requests for the Python Semantic Kernel triage labels Oct 2, 2024
@github-actions github-actions bot changed the title Bug: Chainlit Integration Python: Bug: Chainlit Integration Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Pull requests for the Python Semantic Kernel
Projects
Status: Backlog
Development

No branches or pull requests

3 participants