protectai / rebuff

LLM Prompt Injection Detector
https://playground.rebuff.ai
Apache License 2.0
1.01k stars 67 forks source link

Fix JS API client #96

Open ristomcgehee opened 6 months ago

ristomcgehee commented 6 months ago

I realized that in #90, I left the javascript-sdk in a state where it doesn't compile. My reasoning for not including javascript-sdk/src/api.ts in that PR was because the server API had not been updated yet, so the interface would be wrong if I included these changes in api.ts. I forgot to take into account that the types wouldn't match and would cause a compile error. I'm including those changes now because I think it's better to have the API client not match than to have the whole project not compile. Really I just need to stop submitting breaking changes :grimacing:

I also added npm run build to the CI checks to prevent this sort of thing in the future.

ristomcgehee commented 5 months ago

@seanpmorgan friendly bump