concatenate history of user messages for hallucination (#177)

* concatenate history of user messages for hallucination

* add history of messages

* fix gpt to not arch

* add model prefix

* fix

* correct init of user_messages

* fmt

* fix test
This commit is contained in:
Co Tran 2024-10-15 11:43:05 -07:00 committed by GitHub
parent 35c5e303b7
commit b1746b38b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 44 additions and 8 deletions

View file

@ -177,7 +177,7 @@ async def hallucination(req: HallucinationRequest, res: Response):
"""
Take input as text and return the prediction of hallucination for each parameter
"""
logger.info(f"hallucination request: {req}")
if req.model != zero_shot_model["model_name"]:
raise HTTPException(status_code=400, detail="unknown model: " + req.model)