leondz / garak

LLM vulnerability scanner
https://discord.gg/uVch4puUCs
Apache License 2.0
1.04k stars 121 forks source link

generator: sensenova #666

Open beike2020 opened 1 month ago

beike2020 commented 1 month ago

wrap llm https://pypi.org/project/sensenova/ as a garak generator

leondz commented 1 month ago

Interesting, thanks. Do you have more info on the sensetime/sensenova API? I'm having trouble finding out more, or seeing where to get an API key (searching in English)

beike2020 commented 1 month ago

https://platform.sensenova.cn/home

beike2020 commented 1 month ago

API:https://platform.sensenova.cn/doc?path=/chat/GetStarted/Library.md

beike2020 commented 1 month ago

Which files or modules need to be modified to be compatible with this model?

leondz commented 1 month ago

好的,谢谢

One module needs to be created under garak/generators/, plus a doc stub in docs/src/. It's worth looking at the other modules in the generators dir to see how that's done. If there is full compatibility with the OpenAI library, openai.py offers useful abstractions and nim.py has an example of its use. It's also good to add tests - see tests/generators/.

PRs are of course welcome! See the (short) contributing page on https://reference.garak.ai. If you can help point to where API key signup is, we'll be in a good position to validate / build.

beike2020 commented 1 month ago

thanks

beike2020 commented 1 month ago

At present, the API key is not open to ordinary users, but if it is open, I will provide you with the entrance address. Thank you again for your patient answer.