Skip to content

Commit

Permalink
Fix linting errors and a few minors
Browse files Browse the repository at this point in the history
  • Loading branch information
planger authored and JonasHelming committed Oct 28, 2024
1 parent dbd5e05 commit a1ec8ca
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions packages/ai-chat/src/common/o1-chat-agent.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
// *****************************************************************************
// Copyright (C) 2024 EclipseSource GmbH.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// http://www.eclipse.org/legal/epl-2.0.
//
// This Source Code may also be made available under the following Secondary
// Licenses when the conditions for such availability set forth in the Eclipse
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
// with the GNU Classpath Exception which is available at
// https://www.gnu.org/software/classpath/license.html.
//
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
// *****************************************************************************

import {
ChatAgent,
ChatAgentLocation,
AbstractStreamParsingChatAgent,
SystemMessageDescription
} from './chat-agents'; // Adjust the import path as necessary
} from './chat-agents';

import { injectable } from '@theia/core/shared/inversify';
import { AgentSpecificVariables, PromptTemplate } from '@theia/ai-core';


@injectable()
export class O1ChatAgent extends AbstractStreamParsingChatAgent implements ChatAgent {


readonly variables: string[];
readonly functions: string[] = [];
public name = 'O1-Preview';
public description = 'An agent for interacting with ChatGPT o1-preview';
public promptTemplates: PromptTemplate[] = [];
public defaultModel = 'o1-preview';
readonly agentSpecificVariables: AgentSpecificVariables[] = [];

readonly variables: string[] = [];
readonly functions: string[] = [];

constructor() {
super(
Expand All @@ -29,14 +40,8 @@ export class O1ChatAgent extends AbstractStreamParsingChatAgent implements ChatA
purpose: 'chat',
identifier: 'openai/o1-preview',
}],
'chat',
'codicon codicon-chat',
ChatAgentLocation.ALL,
['Chat'],
true
'chat'
);
this.agentSpecificVariables = [];
this.variables = [];
}

protected async getSystemMessageDescription(): Promise<SystemMessageDescription | undefined> {
Expand Down

0 comments on commit a1ec8ca

Please sign in to comment.