@@ -18,7 +18,8 @@ export type OnUpdate = (completion: CompletionResponse) => void | Promise<void>;
18
18
export const HUMAN_PROMPT = "\n\nHuman:" ;
19
19
export const AI_PROMPT = "\n\nAssistant:" ;
20
20
21
- const CLIENT_ID = "anthropic-typescript/0.4.3" ;
21
+ const ANTHROPIC_SDK = "anthropic-typescript/0.4.4" ;
22
+ const ANTHROPIC_VERSION = "2023-01-01" ;
22
23
const DEFAULT_API_URL = "https://api.anthropic.com" ;
23
24
24
25
enum Event {
@@ -52,7 +53,8 @@ export class Client {
52
53
headers : {
53
54
Accept : "application/json" ,
54
55
"Content-Type" : "application/json" ,
55
- Client : CLIENT_ID ,
56
+ "Anthropic-SDK" : ANTHROPIC_SDK ,
57
+ "Anthropic-Version" : ANTHROPIC_VERSION ,
56
58
"X-API-Key" : this . apiKey ,
57
59
} ,
58
60
body : JSON . stringify ( { ...params , stream : false } ) ,
@@ -95,7 +97,8 @@ export class Client {
95
97
headers : {
96
98
Accept : "application/json" ,
97
99
"Content-Type" : "application/json" ,
98
- Client : CLIENT_ID ,
100
+ "Anthropic-SDK" : ANTHROPIC_SDK ,
101
+ "Anthropic-Version" : ANTHROPIC_VERSION ,
99
102
"X-API-Key" : this . apiKey ,
100
103
} ,
101
104
body : JSON . stringify ( { ...params , stream : true } ) ,
0 commit comments