Skip to content

Commit

Permalink
Organize imports
Browse files Browse the repository at this point in the history
  • Loading branch information
EWouters committed Sep 19, 2024
1 parent 925b25e commit 6212451
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 12 deletions.
2 changes: 2 additions & 0 deletions backend/chainlit/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
import nest_asyncio
import uvicorn

# Not sure if it is necessary to call nest_asyncio.apply() before the other imports
nest_asyncio.apply()

# ruff: noqa: E402
from chainlit.cache import init_lc_cache
from chainlit.config import (
BACKEND_ROOT,
Expand Down
3 changes: 1 addition & 2 deletions backend/chainlit/haystack/callbacks.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import re
from typing import Any, Generic, List, Optional, TypeVar

from chainlit import Message
from chainlit.step import Step
from chainlit.sync import run_sync
from haystack.agents import Agent, Tool
from haystack.agents.agent_step import AgentStep
from literalai.helper import utc_now

from chainlit import Message

T = TypeVar("T")


Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/chat_settings/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from chainlit.input_widget import Select, Slider, Switch

import chainlit as cl
from chainlit.input_widget import Select, Slider, Switch


@cl.on_chat_start
Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/data_layer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pickle
from typing import Dict, List, Optional

import chainlit as cl
import chainlit.data as cl_data
from chainlit.data.utils import queue_until_user_message
from chainlit.element import Element, ElementDict
Expand All @@ -17,8 +18,6 @@
)
from literalai.helper import utc_now

import chainlit as cl

now = utc_now()

thread_history = [
Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/llama_index_cb/main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import chainlit as cl
from llama_index.core.callbacks.schema import CBEventType, EventPayload
from llama_index.core.llms import ChatMessage, ChatResponse
from llama_index.core.schema import NodeWithScore, TextNode

import chainlit as cl


@cl.on_chat_start
async def start():
Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/plotly/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import plotly.graph_objects as go

import chainlit as cl
import plotly.graph_objects as go


@cl.on_chat_start
Expand Down
3 changes: 1 addition & 2 deletions cypress/e2e/pyplot/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import matplotlib.pyplot as plt

import chainlit as cl
import matplotlib.pyplot as plt


@cl.on_chat_start
Expand Down

0 comments on commit 6212451

Please sign in to comment.