Spaces:
Runtime error
Runtime error
url validation
Browse files
app.py
CHANGED
@@ -28,12 +28,12 @@ def qa(sp,engine,message):
|
|
28 |
async def factory():
|
29 |
url = await cl.AskUserMessage(author="Beast",content="Enter url").send()
|
30 |
print(url)
|
31 |
-
|
32 |
-
|
33 |
auth = await cl.AskUserMessage(author="Beast",content="Enter auth token").send()
|
34 |
print(auth)
|
35 |
model = 'deploy-llm'
|
36 |
-
llm = MonsterLLM(model=model,base_url=
|
37 |
cl.user_session.set("llm", llm)
|
38 |
# files = None
|
39 |
# while files is None:
|
|
|
28 |
async def factory():
|
29 |
url = await cl.AskUserMessage(author="Beast",content="Enter url").send()
|
30 |
print(url)
|
31 |
+
index_ai = url['output'].find("ai")
|
32 |
+
url_ai = url['output'][:index_ai + 2]
|
33 |
auth = await cl.AskUserMessage(author="Beast",content="Enter auth token").send()
|
34 |
print(auth)
|
35 |
model = 'deploy-llm'
|
36 |
+
llm = MonsterLLM(model=model,base_url=url_ai,monster_api_key=auth['output'],temperature=0.75, context_window=1024)
|
37 |
cl.user_session.set("llm", llm)
|
38 |
# files = None
|
39 |
# while files is None:
|