Spaces:
Sleeping
Sleeping
daniellefranca96
commited on
Commit
·
15d43aa
1
Parent(s):
f2886e5
Update main.py
Browse files
main.py
CHANGED
@@ -46,8 +46,8 @@ llms = {
|
|
46 |
class validation(BaseModel):
|
47 |
prompt: str
|
48 |
llm: str
|
49 |
-
max_tokens: int
|
50 |
-
nctx: int
|
51 |
|
52 |
|
53 |
#Fast API
|
@@ -59,8 +59,8 @@ async def stream(item: validation):
|
|
59 |
model = llms[item.llm]
|
60 |
prefix=model['prefix']
|
61 |
suffix=model['suffix']
|
62 |
-
nctx =
|
63 |
-
max_tokens =
|
64 |
user="""
|
65 |
{prompt}"""
|
66 |
|
|
|
46 |
class validation(BaseModel):
|
47 |
prompt: str
|
48 |
llm: str
|
49 |
+
max_tokens: int = 512
|
50 |
+
nctx: int = 2048
|
51 |
|
52 |
|
53 |
#Fast API
|
|
|
59 |
model = llms[item.llm]
|
60 |
prefix=model['prefix']
|
61 |
suffix=model['suffix']
|
62 |
+
nctx = item.nctx if item.nctx is not None else model['nctx']
|
63 |
+
max_tokens = item.max_tokens if item.max_tokens is not None else model 512
|
64 |
user="""
|
65 |
{prompt}"""
|
66 |
|