switch default LLM from a model that is going away (#1202)

* switch default LLM from a model that is going away

If an api key is provided, Grist can use an LLM as an assistant
for writing formulas. The LLM can be self-hosted or an external
service. The default external service is OpenAI. This commit
freshens the default model used, if this feature is enabled,
since the existing one is going away. Benchmarking suggests the
results are generally better, though not dramatically so.

The feature of falling back on a longer context model is no longer
as important, but is retained since it could be useful for self-hosters.

* update long context model tests
This commit is contained in:
Paul Fitzpatrick
2024-09-13 14:56:42 -04:00
committed by GitHub
parent 43f7fbeff4
commit a45a7f9fda
2 changed files with 28 additions and 15 deletions

View File

@@ -148,8 +148,8 @@ class RetryableError extends Error {
* An optional ASSISTANT_MAX_TOKENS can be specified.
*/
export class OpenAIAssistant implements Assistant {
public static DEFAULT_MODEL = "gpt-3.5-turbo-0613";
public static DEFAULT_LONGER_CONTEXT_MODEL = "gpt-3.5-turbo-16k-0613";
public static DEFAULT_MODEL = "gpt-4o-2024-08-06";
public static DEFAULT_LONGER_CONTEXT_MODEL = "";
private _apiKey?: string;
private _model?: string;