ScottLogic / prompt-injection

Application which investigates defensive measures against prompt injection attacks on an LLM, with a focus on the exposure of external tools.
MIT License
11 stars 9 forks source link

Use all tool_calls in response, not just first one #906

Closed chriswilty closed 2 months ago

chriswilty commented 2 months ago

Description

More recent ChatGPT models can return more than one tool_call in a chat completion. Our code assumed only one tool_call, which was the case originally, but no longer! This PR addresses that, while also adding tests and cleaning up some code redundancy.

Resolves #764

Checklist

Have you done the following?