File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,6 @@ props的属性中值为对象,且包含type和value属性,type为JSExpressio
4646
4747直接上下文如下:
4848$codeBeforeCursor$<cursor >$codeAfterCursor$
49- 请从<cursor >(光标位置)处进行补全
49+ 请从<cursor >(光标位置)后进行补全
5050注意如果是函数时,须以function关键字开头,不使用箭头函数
5151请只返回代码,且只返回一个示例,不需要思考过程和解释
Original file line number Diff line number Diff line change @@ -195,15 +195,15 @@ const generateBaseReference = () => {
195195}
196196
197197const fetchAiInlineCompletion = ( codeBeforeCursor , codeAfterCursor ) => {
198- const { model , apiKey, baseUrl } = useRobot ( ) . robotSettingState ?. selectedModel || { }
199- if ( ! model || ! apiKey || ! baseUrl ) {
200- throw new Error ( `"modelName " & "apiKey" & "baseUrl" cannot be empty` )
198+ const { completeModel , apiKey, baseUrl } = useRobot ( ) . robotSettingState ?. selectedModel || { }
199+ if ( ! completeModel || ! apiKey || ! baseUrl ) {
200+ throw new Error ( `"model " & "apiKey" & "baseUrl" cannot be empty` )
201201 }
202202 const referenceContext = generateBaseReference ( )
203203 return getMetaApi ( META_SERVICE . Http ) . post (
204204 `${ baseUrl } /chat/completions` ,
205205 {
206- model,
206+ model : completeModel ,
207207 messages : [
208208 {
209209 role : 'user' ,
You can’t perform that action at this time.
0 commit comments