File tree 1 file changed +21
-15
lines changed
1 file changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -73,13 +73,27 @@ export class GlamaHandler implements ApiHandler, SingleCompletionHandler {
73
73
}
74
74
75
75
const { data : completion , response } = await this . client . chat . completions
76
- . create ( {
77
- model : this . getModel ( ) . id ,
78
- max_tokens : maxTokens ,
79
- temperature : 0 ,
80
- messages : openAiMessages ,
81
- stream : true ,
82
- } )
76
+ . create (
77
+ {
78
+ model : this . getModel ( ) . id ,
79
+ max_tokens : maxTokens ,
80
+ temperature : 0 ,
81
+ messages : openAiMessages ,
82
+ stream : true ,
83
+ } ,
84
+ {
85
+ headers : {
86
+ "X-Glama-Metadata" : JSON . stringify ( {
87
+ labels : [
88
+ {
89
+ key : "app" ,
90
+ value : "vscode.rooveterinaryinc.roo-cline" ,
91
+ } ,
92
+ ] ,
93
+ } ) ,
94
+ } ,
95
+ } ,
96
+ )
83
97
. withResponse ( )
84
98
85
99
const completionRequestId = response . headers . get ( "x-completion-request-id" )
@@ -101,14 +115,6 @@ export class GlamaHandler implements ApiHandler, SingleCompletionHandler {
101
115
{
102
116
headers : {
103
117
Authorization : `Bearer ${ this . options . glamaApiKey } ` ,
104
- "X-Glama-Metadata" : JSON . stringify ( {
105
- labels : [
106
- {
107
- key : "app" ,
108
- value : "vscode.rooveterinaryinc.roo-cline" ,
109
- } ,
110
- ] ,
111
- } ) ,
112
118
} ,
113
119
} ,
114
120
)
You can’t perform that action at this time.
0 commit comments