daniellefranca96 commited on
Commit
f2886e5
1 Parent(s): 3a73661

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -2
main.py CHANGED
@@ -46,6 +46,9 @@ llms = {
46
  class validation(BaseModel):
47
  prompt: str
48
  llm: str
 
 
 
49
 
50
  #Fast API
51
  app = FastAPI()
@@ -56,8 +59,8 @@ async def stream(item: validation):
56
  model = llms[item.llm]
57
  prefix=model['prefix']
58
  suffix=model['suffix']
59
- nctx = model['nctx'] if 'nctx' in item.keys() else 1024
60
- max_tokens = model['max_tokens'] if 'max_tokens' in item.keys() else 512
61
  user="""
62
  {prompt}"""
63
 
 
46
  class validation(BaseModel):
47
  prompt: str
48
  llm: str
49
+ max_tokens: int
50
+ nctx: int
51
+
52
 
53
  #Fast API
54
  app = FastAPI()
 
59
  model = llms[item.llm]
60
  prefix=model['prefix']
61
  suffix=model['suffix']
62
+ nctx = model['nctx'] if item.nctx is not None else 1024
63
+ max_tokens = model['max_tokens'] if item.max_tokens is not None else 512
64
  user="""
65
  {prompt}"""
66