[Bugfix] fix chunker config bug (#1024)

Co-authored-by: Deven Patel <deven298@yahoo.com>
This commit is contained in:
Deven Patel
2023-12-18 17:32:26 +05:30
committed by GitHub
parent bee4e834b1
commit db37b2ac15
3 changed files with 21 additions and 17 deletions

View File

@@ -1,24 +1,24 @@
import chainlit as cl
from embedchain import Pipeline as App
import os
import chainlit as cl
from embedchain import Pipeline as App
os.environ["OPENAI_API_KEY"] = "sk-xxx"
@cl.on_chat_start
async def on_chat_start():
app = App.from_config(config={
'app': {
'config': {
'name': 'chainlit-app'
}
},
'llm': {
'config': {
'stream': True,
}
app = App.from_config(
config={
"app": {"config": {"name": "chainlit-app"}},
"llm": {
"config": {
"stream": True,
}
},
}
})
)
# import your data here
app.add("https://www.forbes.com/profile/elon-musk/")
app.collect_metrics = False
@@ -31,5 +31,5 @@ async def on_message(message: cl.Message):
msg = cl.Message(content="")
for chunk in await cl.make_async(app.chat)(message.content):
await msg.stream_token(chunk)
await msg.send()