Spaces:
Runtime error
Runtime error
url and auth token asking
Browse files
app.py
CHANGED
|
@@ -22,10 +22,10 @@ def qa(sp,message):
|
|
| 22 |
|
| 23 |
@cl.on_chat_start
|
| 24 |
async def factory():
|
| 25 |
-
url = await cl.AskUserMessage(author="Beast",content="Enter
|
| 26 |
index_ai = url['output'].find(".monsterapi.ai")
|
| 27 |
url_ai = url['output'][:index_ai + len(".monsterapi.ai")]
|
| 28 |
-
auth = await cl.AskUserMessage(author="Beast",content="Enter auth
|
| 29 |
model = 'deploy-llm'
|
| 30 |
llm = MonsterLLM(model=model,base_url=url_ai,monster_api_key=auth['output'],temperature=0.75, context_window=1024)
|
| 31 |
service_client = mclient(api_key = auth['output'], base_url = url_ai)
|
|
|
|
| 22 |
|
| 23 |
@cl.on_chat_start
|
| 24 |
async def factory():
|
| 25 |
+
url = await cl.AskUserMessage(author="Beast",content="Enter URL of your deployment").send()
|
| 26 |
index_ai = url['output'].find(".monsterapi.ai")
|
| 27 |
url_ai = url['output'][:index_ai + len(".monsterapi.ai")]
|
| 28 |
+
auth = await cl.AskUserMessage(author="Beast",content="Enter auth-token of your deployment").send()
|
| 29 |
model = 'deploy-llm'
|
| 30 |
llm = MonsterLLM(model=model,base_url=url_ai,monster_api_key=auth['output'],temperature=0.75, context_window=1024)
|
| 31 |
service_client = mclient(api_key = auth['output'], base_url = url_ai)
|