@@ -4,7 +4,7 @@ import * as path from 'path';
4
4
import * as fs from 'fs' ;
5
5
import * as os from 'os' ;
6
6
import { execSync } from 'child_process' ;
7
- import axios from 'axios' ;
7
+ // import axios from 'axios';
8
8
9
9
// Main window reference
10
10
let win : BrowserWindow | null = null ;
@@ -180,34 +180,34 @@ function createWindow(): BrowserWindow {
180
180
return win ;
181
181
}
182
182
183
- async function testCallAnthropic ( ) {
184
- try {
185
- const response = await axios . post ( "https://api.anthropic.com/v1/messages" , {
186
- headers : {
187
- "x-api-key" : "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" ,
188
- "Content-Type" : "application/json" ,
189
- "anthropic-version" : "2023-06-01" ,
190
- "anthropic-dangerous-direct-browser-access" : "true" ,
191
- } ,
192
- body : JSON . stringify ( {
193
- messages : [ {
194
- role : "user" ,
195
- content : "Hello, how are you?"
196
- } ] ,
197
- model : "claude-3-5-sonnet-20241022" ,
198
- max_tokens : 1024 ,
199
- } ) ,
200
- } ) ;
183
+ // async function testCallAnthropic() {
184
+ // try {
185
+ // const response = await axios.post("https://api.anthropic.com/v1/messages", {
186
+ // headers: {
187
+ // "x-api-key": "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",
188
+ // "Content-Type": "application/json",
189
+ // "anthropic-version": "2023-06-01",
190
+ // "anthropic-dangerous-direct-browser-access": "true",
191
+ // },
192
+ // body: JSON.stringify({
193
+ // messages: [{
194
+ // role: "user",
195
+ // content: "Hello, how are you?"
196
+ // }],
197
+ // model: "claude-3-5-sonnet-20241022",
198
+ // max_tokens: 1024,
199
+ // }),
200
+ // });
201
201
202
- console . log ( response ) ;
202
+ // console.log(response);
203
203
204
- const data = response . data ;
205
- return data ;
206
- } catch ( error ) {
207
- console . error ( error ) ;
208
- return null ;
209
- }
210
- }
204
+ // const data = response.data;
205
+ // return data;
206
+ // } catch (error) {
207
+ // console.error(error);
208
+ // return null;
209
+ // }
210
+ // }
211
211
212
212
/**
213
213
* Get system information including OS, CPU, and RAM
0 commit comments