4 ms·
It appears to be configurable: DEFINE_STRING(aitermURL, @"https://api.openai.com/v1/completions https://api.openai.com/v1/completions", SECTION_EXPERIMENTAL @"
by mmastrac 2y ago
It appears to be configurable:
DEFINE_STRING(aitermURL, @"https://api.openai.com/v1/completions https://api.openai.com/v1/completions", SECTION_EXPERIMENTAL @"URL for AI API.\nA ChatGPT API endpoint should be here. Note that this URL is only used if the model name does not begin with `gpt-` because those models used an older API.");
https://github.com/gnachman/iTerm2/blob/a196d31658a8d0aa2dc55c68c0dd28d6e70b3433/sources/iTermAdvancedSettingsModel.m#L768 https://github.com/gnachman/iTerm2/blob/a196d31658a8d0aa2dc5...
- saghul 2y agoI tried it but I get an error: "There was a problem with the AI query: Error from OpenAI: [] is too short - 'messages'" According to the docs it only uses that if the model doesn't begin tieh gpt- and uses an old API, so alas it doesn't seem compatible with ollama. Edit: here is the relevant part of the code: https://github.com/gnachman/iTerm2/blob/a196d31658a8d0aa2dc55c68c0dd28d6e70b3433/sources/AITerm.swift#L518 https://github.com/gnachman/iTerm2/blob/a196d31658a8d0aa2dc5... Looks like adding ollama support is really a matter of changing a few lines of code. Edit 2: Seems to be fixed in the next beta release: https://github.com/gnachman/iTerm2/commit/fcd212490626f1d8ea975ba444a1ea735a4ad859 https://github.com/gnachman/iTerm2/commit/fcd212490626f1d8ea...