<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vim-ai, branch main</title>
<subtitle>personal copy of github.com/madox2/vim-ai</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.ofmax.li/vim-ai/'/>
<entry>
<title>fixed roles parsing</title>
<updated>2024-12-12T22:31:51+00:00</updated>
<author>
<name>Martin Bielik</name>
<email>martin.bielik@instea.sk</email>
</author>
<published>2024-12-12T22:31:51+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.ofmax.li/vim-ai/commit/?id=6554bf7c3c5ff16a4727260a8406f7a989a56598'/>
<id>6554bf7c3c5ff16a4727260a8406f7a989a56598</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed complete command roles after refactoring</title>
<updated>2024-12-12T22:10:30+00:00</updated>
<author>
<name>Martin Bielik</name>
<email>martin.bielik@instea.sk</email>
</author>
<published>2024-12-12T22:10:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.ofmax.li/vim-ai/commit/?id=3cdf03bee337918088e796e484a4a7c985811ad0'/>
<id>3cdf03bee337918088e796e484a4a7c985811ad0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>execute mutliple roles</title>
<updated>2024-12-12T21:32:30+00:00</updated>
<author>
<name>Martin Bielik</name>
<email>martin.bielik@instea.sk</email>
</author>
<published>2024-12-12T21:32:30+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.ofmax.li/vim-ai/commit/?id=c9bc248be2af4b514cef067299255428c9576ef6'/>
<id>c9bc248be2af4b514cef067299255428c9576ef6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #139 from jkoelker/improve_resp</title>
<updated>2024-12-12T08:44:15+00:00</updated>
<author>
<name>Martin Bielik</name>
<email>mx.bielik@gmail.com</email>
</author>
<published>2024-12-12T08:44:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.ofmax.li/vim-ai/commit/?id=522656415ea36e3be2c12c5a78b11067731a50eb'/>
<id>522656415ea36e3be2c12c5a78b11067731a50eb</id>
<content type='text'>
fix(utils): improve response mapping</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix(utils): improve response mapping</pre>
</div>
</content>
</entry>
<entry>
<title>fix(utils): improve response mapping</title>
<updated>2024-12-11T20:20:37+00:00</updated>
<author>
<name>Jason Kölker</name>
<email>jason@koelker.net</email>
</author>
<published>2024-12-11T20:07:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.ofmax.li/vim-ai/commit/?id=b4893b9bdd161cc2e421183d4eaf3c4094656cd8'/>
<id>b4893b9bdd161cc2e421183d4eaf3c4094656cd8</id>
<content type='text'>
Make the reponse mapping more robust by checking for an empty (or
missing) `choices` list and substitute a list with an empty dictionary.
Use `.get` to access the `message` or `delta` object again returning an
empty dictionary if they are not found.

When using `hermes3-405b` on lambda cloud's inference (based on
openrouter) a final response was returned with an empty list for
choices causing a traceback on completion.

Debug log:
```
[2024-12-11 19:49:11.925592] [engine-chat] response: {'id': 'chatcmpl-140a7a938d2149c8a750f47af6a11be1', 'object': 'chat.completion.chunk', 'created': 1733946550, 'model': 'hermes3-405b', 'choices': [{'index': 0, 'delta': {'content': ' today'}, 'finish_reason': None, 'content_filter_results': {'hate': {'filtered': False}, 'self_harm': {'filtered': False}, 'sexual': {'filtered': False}, 'violence': {'filtered': False}, 'jailbreak': {'filtered': False, 'detected': False}, 'profanity': {'filtered': False, 'detected': False}}}], 'system_fingerprint': '', 'usage': {'prompt_tokens': 40, 'completion_tokens': 18, 'total_tokens': 58, 'prompt_tokens_details': None, 'completion_tokens_details': None}}
[2024-12-11 19:49:11.975457] [engine-chat] response: {'id': 'chatcmpl-140a7a938d2149c8a750f47af6a11be1', 'object': 'chat.completion.chunk', 'created': 1733946550, 'model': 'hermes3-405b', 'choices': [{'index': 0, 'delta': {'content': '?'}, 'finish_reason': None, 'content_filter_results': {'hate': {'filtered': False}, 'self_harm': {'filtered': False}, 'sexual': {'filtered': False}, 'violence': {'filtered': False}, 'jailbreak': {'filtered': False, 'detected': False}, 'profanity': {'filtered': False, 'detected': False}}}], 'system_fingerprint': '', 'usage': {'prompt_tokens': 40, 'completion_tokens': 19, 'total_tokens': 59, 'prompt_tokens_details': None, 'completion_tokens_details': None}}
[2024-12-11 19:49:12.008987] [engine-chat] response: {'id': 'chatcmpl-140a7a938d2149c8a750f47af6a11be1', 'object': 'chat.completion.chunk', 'created': 1733946550, 'model': 'hermes3-405b', 'choices': [{'index': 0, 'delta': {}, 'finish_reason': 'stop', 'content_filter_results': {'hate': {'filtered': False}, 'self_harm': {'filtered': False}, 'sexual': {'filtered': False}, 'violence': {'filtered': False}, 'jailbreak': {'filtered': False, 'detected': False}, 'profanity': {'filtered': False, 'detected': False}}}], 'system_fingerprint': '', 'usage': {'prompt_tokens': 40, 'completion_tokens': 20, 'total_tokens': 60, 'prompt_tokens_details': None, 'completion_tokens_details': None}}
[2024-12-11 19:49:12.009400] [engine-chat] response: {'id': 'chatcmpl-140a7a938d2149c8a750f47af6a11be1', 'object': 'chat.completion.chunk', 'created': 1733946550, 'model': 'hermes3-405b', 'choices': [], 'system_fingerprint': '', 'usage': {'prompt_tokens': 40, 'completion_tokens': 19, 'total_tokens': 59, 'prompt_tokens_details': None, 'completion_tokens_details': None}}
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the reponse mapping more robust by checking for an empty (or
missing) `choices` list and substitute a list with an empty dictionary.
Use `.get` to access the `message` or `delta` object again returning an
empty dictionary if they are not found.

When using `hermes3-405b` on lambda cloud's inference (based on
openrouter) a final response was returned with an empty list for
choices causing a traceback on completion.

Debug log:
```
[2024-12-11 19:49:11.925592] [engine-chat] response: {'id': 'chatcmpl-140a7a938d2149c8a750f47af6a11be1', 'object': 'chat.completion.chunk', 'created': 1733946550, 'model': 'hermes3-405b', 'choices': [{'index': 0, 'delta': {'content': ' today'}, 'finish_reason': None, 'content_filter_results': {'hate': {'filtered': False}, 'self_harm': {'filtered': False}, 'sexual': {'filtered': False}, 'violence': {'filtered': False}, 'jailbreak': {'filtered': False, 'detected': False}, 'profanity': {'filtered': False, 'detected': False}}}], 'system_fingerprint': '', 'usage': {'prompt_tokens': 40, 'completion_tokens': 18, 'total_tokens': 58, 'prompt_tokens_details': None, 'completion_tokens_details': None}}
[2024-12-11 19:49:11.975457] [engine-chat] response: {'id': 'chatcmpl-140a7a938d2149c8a750f47af6a11be1', 'object': 'chat.completion.chunk', 'created': 1733946550, 'model': 'hermes3-405b', 'choices': [{'index': 0, 'delta': {'content': '?'}, 'finish_reason': None, 'content_filter_results': {'hate': {'filtered': False}, 'self_harm': {'filtered': False}, 'sexual': {'filtered': False}, 'violence': {'filtered': False}, 'jailbreak': {'filtered': False, 'detected': False}, 'profanity': {'filtered': False, 'detected': False}}}], 'system_fingerprint': '', 'usage': {'prompt_tokens': 40, 'completion_tokens': 19, 'total_tokens': 59, 'prompt_tokens_details': None, 'completion_tokens_details': None}}
[2024-12-11 19:49:12.008987] [engine-chat] response: {'id': 'chatcmpl-140a7a938d2149c8a750f47af6a11be1', 'object': 'chat.completion.chunk', 'created': 1733946550, 'model': 'hermes3-405b', 'choices': [{'index': 0, 'delta': {}, 'finish_reason': 'stop', 'content_filter_results': {'hate': {'filtered': False}, 'self_harm': {'filtered': False}, 'sexual': {'filtered': False}, 'violence': {'filtered': False}, 'jailbreak': {'filtered': False, 'detected': False}, 'profanity': {'filtered': False, 'detected': False}}}], 'system_fingerprint': '', 'usage': {'prompt_tokens': 40, 'completion_tokens': 20, 'total_tokens': 60, 'prompt_tokens_details': None, 'completion_tokens_details': None}}
[2024-12-11 19:49:12.009400] [engine-chat] response: {'id': 'chatcmpl-140a7a938d2149c8a750f47af6a11be1', 'object': 'chat.completion.chunk', 'created': 1733946550, 'model': 'hermes3-405b', 'choices': [], 'system_fingerprint': '', 'usage': {'prompt_tokens': 40, 'completion_tokens': 19, 'total_tokens': 59, 'prompt_tokens_details': None, 'completion_tokens_details': None}}
```
</pre>
</div>
</content>
</entry>
<entry>
<title>allow passing single line range</title>
<updated>2024-12-09T23:04:00+00:00</updated>
<author>
<name>Martin Bielik</name>
<email>martin.bielik@instea.sk</email>
</author>
<published>2024-12-09T23:04:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.ofmax.li/vim-ai/commit/?id=3122b848ee4b32986a5dda739c3ea73b4e696304'/>
<id>3122b848ee4b32986a5dda739c3ea73b4e696304</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>don't include not selected line, refactor ranges, fixes #112</title>
<updated>2024-12-08T22:15:33+00:00</updated>
<author>
<name>Martin Bielik</name>
<email>martin.bielik@instea.sk</email>
</author>
<published>2024-12-08T22:15:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.ofmax.li/vim-ai/commit/?id=9d43ef6c4966705376af2cd16fb012d020ce673d'/>
<id>9d43ef6c4966705376af2cd16fb012d020ce673d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>print prompt in debug mode</title>
<updated>2024-12-08T20:15:53+00:00</updated>
<author>
<name>Martin Bielik</name>
<email>martin.bielik@instea.sk</email>
</author>
<published>2024-12-08T20:15:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.ofmax.li/vim-ai/commit/?id=ea83fdc59b64843f570c94d34d97c3131663d3e8'/>
<id>ea83fdc59b64843f570c94d34d97c3131663d3e8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #136 from drujensen/feature/fix-grok-xai</title>
<updated>2024-12-07T22:14:34+00:00</updated>
<author>
<name>Martin Bielik</name>
<email>mx.bielik@gmail.com</email>
</author>
<published>2024-12-07T22:14:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.ofmax.li/vim-ai/commit/?id=03450bfb8193933916f2c2c2591faff041eb10d1'/>
<id>03450bfb8193933916f2c2c2591faff041eb10d1</id>
<content type='text'>
fix: grok xai blocks without user agent, fixes #136 104</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix: grok xai blocks without user agent, fixes #136 104</pre>
</div>
</content>
</entry>
<entry>
<title>fixed options normalization</title>
<updated>2024-12-07T20:39:34+00:00</updated>
<author>
<name>Martin Bielik</name>
<email>martin.bielik@instea.sk</email>
</author>
<published>2024-12-07T20:39:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.ofmax.li/vim-ai/commit/?id=946ac0d45d4dab7c80d4e2a96957cd6dc87a75ba'/>
<id>946ac0d45d4dab7c80d4e2a96957cd6dc87a75ba</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
