Closed jmdevita closed 8 months ago
Agree. This is blocking any project that has chainlit 1.0.200
from installing the ollama
python sdk, which is currently extremely useful due to its recent OpenAI-compatible API support.
Current workaround is to manually add this user.py file to the chainlit repo.
can you elaborate on this workaround? thanks
I create a copy a file "user.py" to the existing chainlit directory (this file already exists in the newer versions of chainlit).
from dataclasses_json import DataClassJsonMixin from pydantic.dataclasses import Field, dataclass
Provider = Literal[ "credentials", "header", "github", "google", "azure-ad", "okta", "auth0", "descope" ]
class UserDict(TypedDict): id: str identifier: str metadata: Dict
@dataclass class User(DataClassJsonMixin): identifier: str metadata: Dict = Field(default_factory=dict)
@dataclass class PersistedUserFields: id: str createdAt: str
@dataclass class PersistedUser(User, PersistedUserFields): pass
3. Save the file and move/copy to the directory chainlit is installed in (I use python virtual environment 'env' in this example)
- env/lib/python3.10/site-packages/chainlit/
- Note that the python3.10 folder may vary depending on what version of python you are using
4. Run the chainlit app and it should be working.
<img width="311" alt="Screenshot 2024-02-12 at 3 56 35 PM" src="https://github.com/Chainlit/chainlit/assets/53025729/b907575e-67bc-455e-8f83-541a31b52ea7">
This should be fixed, we relaxed the httpx dependency.
Chainlit version 0.7.501 is installed with ollama version 0.1.6. OAUTH does not work as the user.py file is not included in Chainlit version 0.7.501. When attempting to update Chainlit to version 1.0.0, a mismatch error on httpx==0.24.1 occurs, with this error:
Current workaround is to manually add this user.py file to the chainlit repo.