Skip to content

Commit

Permalink
refactor: remove ai model option from config file
Browse files Browse the repository at this point in the history
  • Loading branch information
m2rads committed Nov 11, 2024
1 parent a098e5d commit 249d30e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/shortest/src/ai/ai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export class AIClient {
this.client = new Anthropic({
apiKey: config.apiKey
});
this.model = config.model || 'claude-3-5-sonnet-20241022';
this.maxMessages = config.maxMessages || 10;
this.model = 'claude-3-5-sonnet-20241022';
this.maxMessages = 10;
}

async processAction(
Expand Down
4 changes: 1 addition & 3 deletions packages/shortest/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export interface BrowserConfig {

export interface AIConfig {
apiKey: string;
model?: string;
}

export interface ShortestConfig {
Expand All @@ -49,8 +48,7 @@ export const defaultConfig: ShortestConfig = {
baseUrl: 'http://localhost:3000',
testDir: '__tests__',
ai: {
apiKey: process.env.ANTHROPIC_API_KEY || '',
model: 'claude-3-5-sonnet-20241022'
apiKey: process.env.ANTHROPIC_API_KEY || ''
}
};

Expand Down
3 changes: 1 addition & 2 deletions shortest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export default {
baseUrl: 'http://localhost:3000',
testDir: ['app/__tests__'],
ai: {
apiKey: process.env.ANTHROPIC_API_KEY || '',
model: 'claude-3-5-sonnet-20241022'
apiKey: process.env.ANTHROPIC_API_KEY || ''
}
} satisfies ShortestConfig;

0 comments on commit 249d30e

Please sign in to comment.