File tree Expand file tree Collapse file tree 4 files changed +21
-16
lines changed Expand file tree Collapse file tree 4 files changed +21
-16
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ export default {
1111 model : {
1212 propDefinition : [
1313 app ,
14- "model"
15- ]
14+ "model" ,
15+ ] ,
1616 } ,
1717 } ,
1818
Original file line number Diff line number Diff line change @@ -11,14 +11,14 @@ export default {
1111 model : {
1212 propDefinition : [
1313 app ,
14- "model"
15- ]
14+ "model" ,
15+ ] ,
1616 } ,
1717 message : {
1818 propDefinition : [
1919 app ,
20- "message"
21- ]
20+ "message" ,
21+ ] ,
2222 } ,
2323 } ,
2424
@@ -28,7 +28,10 @@ export default {
2828 data : {
2929 model : this . model ,
3030 messages : [
31- { role : "user" , content : this . message } ,
31+ {
32+ role : "user" ,
33+ content : this . message ,
34+ } ,
3235 ] ,
3336 } ,
3437 } ) ;
Original file line number Diff line number Diff line change @@ -11,14 +11,14 @@ export default {
1111 model : {
1212 propDefinition : [
1313 app ,
14- "model"
15- ]
14+ "model" ,
15+ ] ,
1616 } ,
1717 prompt : {
1818 propDefinition : [
1919 app ,
20- "prompt"
21- ]
20+ "prompt" ,
21+ ] ,
2222 } ,
2323 } ,
2424
Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ export default {
1212 const response = await this . listModels ( ) ;
1313 const modelsIds = response . data ;
1414 return modelsIds . map ( ( { id } ) => ( {
15- value : id
15+ value : id ,
1616 } ) ) ;
17- }
17+ } ,
1818 } ,
1919 prompt : {
2020 type : "string" ,
@@ -29,7 +29,7 @@ export default {
2929 } ,
3030 methods : {
3131 _baseUrl ( ) {
32- return ` https://api.x.ai` ;
32+ return " https://api.x.ai" ;
3333 } ,
3434 async _makeRequest ( opts = { } ) {
3535 const {
@@ -56,12 +56,14 @@ export default {
5656 } ,
5757 async postCompletion ( args = { } ) {
5858 return this . _makeRequest ( {
59- path : ` /v1/completions` ,
59+ path : " /v1/completions" ,
6060 method : "post" ,
6161 ...args ,
6262 } ) ;
6363 } ,
64- async getModel ( { model, ...args } ) {
64+ async getModel ( {
65+ model, ...args
66+ } ) {
6567 return this . _makeRequest ( {
6668 path : `/v1/models/${ model } ` ,
6769 ...args ,
You can’t perform that action at this time.
0 commit comments