-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the Ollama FIM completion (#848)
* Do not send the system message, only the user message to Ollama FIM We just blindly took the first message which could have been a system message. The prompt is in the user message, so let's pass that. * Pass the suffix parameter if present to the FIM generate call Some models don't use FIM markers in the code, but use the suffix top-level attribute instead. If we don't pass it, the FIM won't complete successfully. * Run make format Signed-off-by: Radoslav Dimitrov <[email protected]> * Fix the unit tests for ollama FIM Signed-off-by: Radoslav Dimitrov <[email protected]> * Pass along the `raw` parameter The `raw` parameter tells the LLM to never use natural language, but just reply in the format of the message. We need to pass that to the generate call or else we migth get garbage back to the client. * Print the full reply as debug message in integration tests This is just useful to debug the tests * Adjust the Ollama FIM testcase to match the model we are using The FIM format didn't match the model it seemed. I replaced it with a dump of a FIM message I received from Continue. --------- Signed-off-by: Radoslav Dimitrov <[email protected]> Co-authored-by: Radoslav Dimitrov <[email protected]>
- Loading branch information
Showing
4 changed files
with
40 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters