Update main.py
Browse files
main.py
CHANGED
@@ -21,6 +21,7 @@ from langchain.schema.runnable import Runnable, RunnablePassthrough, RunnableCon
|
|
21 |
from langchain.callbacks.base import BaseCallbackHandler
|
22 |
|
23 |
import chainlit as cl
|
|
|
24 |
from literalai import LiteralClient
|
25 |
@cl.password_auth_callback
|
26 |
def auth_callback(username: str, password: str):
|
@@ -93,6 +94,16 @@ model = HuggingFaceEndpoint(
|
|
93 |
@cl.on_chat_start
|
94 |
async def on_chat_start():
|
95 |
await cl.Message(f"> REVIEWSTREAM").send()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
template = """Answer the question based only on the following context:
|
97 |
|
98 |
{context}
|
|
|
21 |
from langchain.callbacks.base import BaseCallbackHandler
|
22 |
|
23 |
import chainlit as cl
|
24 |
+
from chainlit.input_widget import TextInput, Select, Switch, Slider
|
25 |
from literalai import LiteralClient
|
26 |
@cl.password_auth_callback
|
27 |
def auth_callback(username: str, password: str):
|
|
|
94 |
@cl.on_chat_start
|
95 |
async def on_chat_start():
|
96 |
await cl.Message(f"> REVIEWSTREAM").send()
|
97 |
+
settings = await cl.ChatSettings(
|
98 |
+
[
|
99 |
+
Select(
|
100 |
+
id="Model",
|
101 |
+
label="Publications de recherche",
|
102 |
+
values=["---", "HAL", "Persée"],
|
103 |
+
initial_index=0,
|
104 |
+
),
|
105 |
+
]
|
106 |
+
).send()
|
107 |
template = """Answer the question based only on the following context:
|
108 |
|
109 |
{context}
|