aivillage / llm_verification

LLM prompt attacks for hacker CTFs via CTFd.
https://aivillage.org
8 stars 1 forks source link

Logger sort of fixed #22

Closed canyon289 closed 11 months ago

canyon289 commented 11 months ago

llmv_routes is not using the configured logger, detailed in the issue below. Still trying to figure it out

https://github.com/aivillage/llm_verification/issues/21

canyon289 commented 11 months ago

Ready for review. PR doesn't smoothly fix logging issue, just changes everything to error so it logs to console. It does add an extra exception handler which which provides readable exception of what is going wrong where

I propose merging and then fixing logging handler issues in a separate PR.

comath commented 11 months ago

The logger seemed to work fine on my machine 😁. I think the solution to this is a new function in llm_logger that returns the appropriate logger, guaranteed.

I'm not a fan of logging to error, but the rest looks good

canyon289 commented 11 months ago

The logger seemed to work fine on my machine 😁. I think the solution to this is a new function in llm_logger that returns the appropriate logger, guaranteed.

I'm not a fan of logging to error, but the rest looks good

Tried this but it seems to make things worse. Leaving this branch open for now, moved the json exception handling to another PR since thats the bigger problem anyway

https://github.com/aivillage/llm_verification/pull/22

=