Hi @all If you are having issue with the UI action then please use the below code --------------------------------------------------------------------------------------------------------------------------------- function runClientCode() {
Hi Ravi. Thanks for this great video. Please I need help. After copying and pasting the above scripts, am getting this error message - "Could not save record because of a compile error: JavaScript parse error at line (27) column (35) problem = missing } after function body (; line 27)"
{ "error": { "message": "You exceeded your current quota, please check your plan and billing details.", "type": "insufficient_quota", "param": null, "code": "insufficient_quota" } }
Hi Ravi, Thanks for the video. I really enjoy your way of presenting the material. I'm a ServiceNow Admin in League City, Texas. I'm can't wait to see how ChatGPT and other AI's will integrate and improve ServiceNow. One thing that really impresses me are your thumbnails. Do you mind sharing how you come up with such striking thumbnails?
gsftSubmit is used to execute the Server-side section of the script after the client-side portion has been completed successfully. validation is not successful at the Client side, Server-side function would not be initiated. This can be achieved without using client and action name Passing Action name as parameter in gsftSubmit ensures the Client side validation to move ahead. Although Great Work!!
Integration is not my cup of tea but ur integration videoes are so easy to understand. in the rest message content on what basis u have given json as model prompt temp etc is this static and mentioned in the document to use this? or how?? this might be very basic question but would like to know
Hi Ravi, This is great video. I learned a lot. Is it possible to open a ticket in serviceNow using ChatGPT or OpenAI after we search for something in chatGPT?
@@learnservicenowwithravi I tried the same, looks like model davinci is deprecated and a new one has come instead and the new one throws 429 error code and I was wondering if it's because of free account. Could you please help?
Sir your videos are too Helpful.I want to know I am fresher 2023 passout Can I get a Job as a fresher ServiceNow Developer As I can't see much jobs for fresher.Almpst every company is demanding 3-4 years of Company .Can you guide me how to start a job or internship as a fresher .
Hi Ravi, we have a use case where boomi uses their real time inbuilt connector to connect with servicenow to read and pick an HR case record report from ServiceNow. We have shared the end point(from rest api explorer) and authentication details with Boomi.. how can we faciliate for boomi to pick up the report? do we need to do any steps in order to automatically generate and export reports in servicenow for boomi to pick up? how can we do this
There are three reasons you might receive the "You've reached your usage limit" error:
If you're using a free trial account, remember that the tokens granted in this trial expire three months after account creation. To continue using the API after that point, you'll need to enter billing information and upgrade to a paid plan.
Another potential explanation is that you may have created multiple accounts using a single phone number. We only grant free tokens to the first account created with a given phone number. In this situation, the solution is to log into the account you originally created to access those initial free tokens.
If you're already on a paid plan, you may need to either increase your monthly usage hard limit. To set your limit over the approved usage limit (normally, $120.00/month) please submit a quota increase request.
Why did I get charged if I'm supposed to have free credits? Only the first API account verified with a given phone number is granted free trial tokens. A phone number can be used up to 2 times to verify sign ups. We only provide the free trial tokens to the first sign up, not more.
Hi Ravi, Thanks for the Video. When I click on Test Run, I get the message "You exceeded your current quota, please check your plan and billing details."". Is there any paid subscription needed for chatGpt?
Hi .. you don’t need any paid subscription.. create new account with different email on chat gpt and try again .. it will work.. The same happened to me for the first time..I did the same.
Hlo Ravi can u guide me i got error like this"error": { "message": "You exceeded your current quota, please check your plan and billing details.", "type": "insufficient_quota",
Hey thanks for the video, my rest message is working but Ui action is not working when I click on the created button the form is reloading while clearing the values.
Hi Ravi, I followed the same steps that you mentioned...also tried the updated script from comments but I'm not getting the correct response. HTTP Method gives the response but the UI Action doesn't. Here is what I see in the response: " || typeof window === "undefined") { global.window = {} } const { JSDOM } = require("jsdom") const { document } = (new JSDOM(`...`)).window global.document = document Can you please help me solve this?
Hi , While doing Test , in HTTP status [ 429 ] , Response is { "error": { "message": "You exceeded your current quota, please check your plan and billing details.", "type": "insufficient_quota", "param": null, "code": null } } I have followed as per your video , where i have made mistake .
Great video. Thank you for doing this. After some troubleshooting, I was finally able to complete this. My problem was that I was able to get the response from ChatGPT within the REST API testing, but the UI Action did not work. I had to add the following code after the gsftSubmit function. if (typeof window == 'undefined') runRestAPICode(); function runRestAPICode() { var r = new sn_ws.RESTMessageV2('Chat GPT', 'GetGPTResponse'); .......
I am greeting error like " You exceeded your current quota, please check your plan and billing details" ,created another accounts but still same error any idea how to resolved it .watch video on you tube but not looking promising asking me to connect to some France server
I get this Error - Pls help { "error": { "message": "The model `text-davinic-003` does not exist", "type": "invalid_request_error", "param": null, "code": "model_not_found" } }
hi ravi, i mailed you regarding the image integration and currently also unable to fetch data from this chatgpt integration altough i follow every steps you did but on clicking give me answer button its not giving the result...kindly help regarding also plz reply on the mail....have a good day : )
Hi Ravi, thank you for the information and useful vedio. I have configured everything as you did. When I am testing my method then I am getting response, however when I click on the UI action then I do not get logs, I guess script does not run. my script : function runClientCode() { gsftSubmit(null, g_form.getElement(), "run_server"); } gs.info("IAMIN"); var r = new sn_ws.RESTMessageV2('ChatGPT', 'ChatGPTResponse'); r.setStringParameterNoEscape("temp", '0.5'); r.setStringParameterNoEscape("prompt", current.u_ask_any_question); r.setStringParameterNoEscape("max_tokens", '1024'); r.setStringParameterNoEscape("model", 'text-davinci-003'); var response = r.execute(); gs.info("IAMIN1"); var responseBody = response.getBody(); var httpStatus = response.getStatusCode(); gs.info("IAMIN2 Response " + responseBody); var jsonObj = JSON.parse(responseBody); var reply = jsonObj.choices[0].text; current.u_your_answer = reply; current.update(); action.setRedirectURL(current);
Hi Ravi It's not working, and i checked many videos of all the videos. is the same as like your video, but now this method is not help full Can you please help me
Does anyone have this error ? { "error": { "message": "You exceeded your current quota, please check your plan and billing details.", "type": "insufficient_quota", "param": null, "code": null } }
i get "Basic authentication failed for user: mid_server_atr" when running from the UI Action, From the Rest Message setup the test works no problem. Below is my script. function runClientCode() { gsftSubmit(null, g_form.getElement(), "run_server"); if (typeof window == 'undefined') runRestAPICode(); } function runRestAPICode() { var r = new sn_ws.RESTMessageV2('Chat GPT', 'GetGPTResponse'); r.setStringParameterNoEscape('model', 'text-davinci-003'); r.setStringParameterNoEscape('prompt', current.u_ask_any_question); r.setStringParameterNoEscape('max_token', '1024'); r.setStringParameterNoEscape('temp', '0.5'); var response = r.execute(); var responseBody = response.getBody(); var httpStatus = response.getStatusCode(); gs.log("The response body== " + responseBody); }
I'm getting the below 429 error in the REST Message { "error": { "message": "You exceeded your current quota, please check your plan and billing details.", "type": "insufficient_quota", "param": null, "code": "insufficient_quota" } }
Hi am getting the following error in .log The response body== {"id":"cmpl-78ppn9kqT1K9rZhpPi9OrXtLsqdBS","object":"text_completion","created":1682340231,"model":"text-davinci-003","choices":[{"text":",
I am using the \"Get Current User\" action in my Flow.
The action is returning the user's display name, but I need to get the user's email address.
Is there any way to get the user's email address from this action?
Hi @all If you are having issue with the UI action then please use the below code
---------------------------------------------------------------------------------------------------------------------------------
function runClientCode() {
gsftSubmit(null, g_form.getFormElement(), "run_server");
}
if (typeof window == 'undefined') {
runServerCode();
}
function runServerCode() {
var r1 = new sn_ws.RESTMessageV2('Chat GPT', 'askChatGPT');
r1.setStringParameterNoEscape('prompt', current.u_question);
r1.setStringParameterNoEscape('max_token', '1024');
r1.setStringParameterNoEscape('temp', '0.5');
r1.setStringParameterNoEscape('model', 'text-davinci-003');
var response1 = r1.execute();
var responseBody1 = response1.getBody();
var httpStatus1 = response1.getStatusCode();
gs.info("Test "+responseBody1);
var responseObject1 = JSON.parse(responseBody1);
var test1 = responseObject1.choices[0].text;
current.u_answer = test1.trim();
current.update();
action.setRedirectURL(current);
now working fine
Thank you Ravi it's working fine now
Hi Ravi. Thanks for this great video. Please I need help. After copying and pasting the above scripts, am getting this error message - "Could not save record because of a compile error: JavaScript parse error at line (27) column (35) problem = missing } after function body (; line 27)"
@@richardadetimehin1459 please paste your code check whether the parenthesis is missing
{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
"param": null,
"code": "insufficient_quota"
}
}
Very Useful vedio
Kudos for such a clean explanation and your efforts for us. Thanks Brother.
Please bring a series on integration videos .
As soon as possible I will bring integration content
Yes please I'm also waiting ❤ please make fast
great explaination Sir
You are legend!! Plus, you're doing this in 2 languages! So cool 😎 Thank you so much for the guidance!!!
Thanks a lot
Nice Tuto ! Great Job !
Thanks ❤️
great tutorial video 👏👏👏
Thanks 🤩
This is great video. I learned a lot :P
Thanks 😊
Hi Ravi, Thanks for the video. I really enjoy your way of presenting the material. I'm a ServiceNow Admin in League City, Texas. I'm can't wait to see how ChatGPT and other AI's will integrate and improve ServiceNow. One thing that really impresses me are your thumbnails. Do you mind sharing how you come up with such striking thumbnails?
Thanks for finding this video very useful..
Its just an Image I create with AI itself and edited that picture with the content title
Very helpful thank you so much
Thanks for your feedback
wow mathe pe tilak . I like it.
Thank you❤❤❤❤
gsftSubmit is used to execute the Server-side section of the script after the client-side portion has been completed successfully.
validation is not successful at the Client side, Server-side function would not be initiated.
This can be achieved without using client and action name
Passing Action name as parameter in gsftSubmit ensures the Client side validation to move ahead.
Although Great Work!!
Thanks for the input man
Very helpful, please make a video with REST API for the healthcare custom app from ServiceNow to any Healthcare system
As soon as possible
Great! Thank you sir for sharing your knowledge with us.
Thanks 🙏
Helpful ❤
I'm glad!
❤😅 excellent video
Glad you enjoyed it
Please make a video for Complete CMDB
Hi @learnservicnowwithravi
Please make video on Gemini AI integration with Servicenow..
Very soon
Integration is not my cup of tea but ur integration videoes are so easy to understand.
in the rest message content on what basis u have given json as model prompt temp etc
is this static and mentioned in the document to use this? or how??
this might be very basic question but would like to know
Priyanka to understand this check other videos on Integration.. there every doubt will be clear
Hi Ravi, This is great video. I learned a lot.
Is it possible to open a ticket in serviceNow using ChatGPT or OpenAI after we search for something in chatGPT?
Yes, you can through Virtual agent
Hi, Could you please integrate Chat GPT with SNOW Chat BOT !! Please create one video on this. Great. Than you
Yes, soon
Hi Ravi wonderful video. What if i want to publish this on a portal so that end-user can enter a form and use this?
We can use this in record producer or service catalog
I will soon create the video on this
Very informative..where can I download the docx
I will create a link and share with you.. you will not find the doc anywhere. I have created the document
Hi Sir, Thank you so much for your video, it is very informative and clear.
Will this setup only work for paid accounts?
No it will work for free account also
@@learnservicenowwithravi I tried the same, looks like model davinci is deprecated and a new one has come instead and the new one throws 429 error code and I was wondering if it's because of free account. Could you please help?
Hi Ravi, could you please share that word document you prepared for initial configuration
chat.whatsapp.com/DzTFY2NBIyh2RitK1MCVKm
Join this group link.. And ping there
Sir your videos are too Helpful.I want to know I am fresher 2023 passout Can I get a Job as a fresher ServiceNow Developer As I can't see much jobs for fresher.Almpst every company is demanding 3-4 years of Company .Can you guide me how to start a job or internship as a fresher .
Join my whatsapp group. Link is in video discription.
Hi Ravi, we have a use case where boomi uses their real time inbuilt connector to connect with servicenow to read and pick an HR case record report from ServiceNow. We have shared the end point(from rest api explorer) and authentication details with Boomi.. how can we faciliate for boomi to pick up the report? do we need to do any steps in order to automatically generate and export reports in servicenow for boomi to pick up? how can we do this
Will bring video soon
@@learnservicenowwithravi thank you so much
Helpful video , I got an error 429
Login with new email id on chat gpt api page and then you can use it
There are three reasons you might receive the "You've reached your usage limit" error:
If you're using a free trial account, remember that the tokens granted in this trial expire three months after account creation. To continue using the API after that point, you'll need to enter billing information and upgrade to a paid plan.
Another potential explanation is that you may have created multiple accounts using a single phone number. We only grant free tokens to the first account created with a given phone number. In this situation, the solution is to log into the account you originally created to access those initial free tokens.
If you're already on a paid plan, you may need to either increase your monthly usage hard limit. To set your limit over the approved usage limit (normally, $120.00/month) please submit a quota increase request.
Why did I get charged if I'm supposed to have free credits?
Only the first API account verified with a given phone number is granted free trial tokens. A phone number can be used up to 2 times to verify sign ups. We only provide the free trial tokens to the first sign up, not more.
Chatgpt is free till some account.. you can try with new phone no and email id
Hi Ravi, Thanks for the Video. When I click on Test Run, I get the message "You exceeded your current quota, please check your plan and billing details."". Is there any paid subscription needed for chatGpt?
Hi .. you don’t need any paid subscription.. create new account with different email on chat gpt and try again .. it will work..
The same happened to me for the first time..I did the same.
@@learnservicenowwithravi Thanks Ravi, It works after creating a new account with diff email.
@balajiiprusty - i am also facing same issue , i have followed ravi's comments also not working
same
Hlo Ravi can u guide me i got error like this"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
Change the mail id.. inorder to achieve it
Change the mail id on the chatgpt side
hai iam facing the same problem
Can you please let me know "why did we take POST method instead of GET method to get Response?
Please let me know.....
Post is to create a record and get is to retrieved
Hey thanks for the video, my rest message is working
but Ui action is not working when I click on the created button the form is reloading while clearing the values.
chat.whatsapp.com/DzTFY2NBIyh2RitK1MCVKm
Please join here
And share your code.. I will have a look
hi Ravi as per ur old comments i have created new account in Chat GPT and follwed the same steps , still same error i am facing
Thanks for reaching out to me on whatsapp
Hi Ravi, I followed the same steps that you mentioned...also tried the updated script from comments but I'm not getting the correct response.
HTTP Method gives the response but the UI Action doesn't.
Here is what I see in the response:
" || typeof window === "undefined") {
global.window = {}
}
const { JSDOM } = require("jsdom")
const { document } = (new JSDOM(`...`)).window
global.document = document
Can you please help me solve this?
Can you ping me on my WhatsApp community
The error message and status code you're encountering indicate that you have exceeded your current quota for API usage with OpenAI's services.
Use new number and email
Hi , While doing Test , in HTTP status [ 429 ] ,
Response is
{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
"param": null,
"code": null
}
}
I have followed as per your video , where i have made mistake .
Try creating new account with new token and rest messages
I am getting error with 429 code. Please help me out. It Showing like end point is not working. What should I do ?😊
Model of chatgpt is changed.. you need to change the model
Great video. Thank you for doing this. After some troubleshooting, I was finally able to complete this. My problem was that I was able to get the response from ChatGPT within the REST API testing, but the UI Action did not work. I had to add the following code after the gsftSubmit function.
if (typeof window == 'undefined')
runRestAPICode();
function runRestAPICode() {
var r = new sn_ws.RESTMessageV2('Chat GPT', 'GetGPTResponse');
.......
Awesome brother… its great that you are able to integrate with chat gpt…
I am happy that my video is helpful for everyone
Hello, shriaz... could you share your whole script? I have the same problem, but I don't know how to fix it. Thanks, in advance.
Kindly help me with the complete Script as I'm also facing the same error like you while testing in the UI Action
I am greeting error like " You exceeded your current quota, please check your plan and billing details" ,created another accounts but still same error any idea how to resolved it .watch video on you tube but not looking promising asking me to connect to some France server
Whatsapp Group Link :-
chat.whatsapp.com/EeYpJt9hZfB0PauzYF5KL3
Join here please and ask me any question
So in this case create a new account with chatgpt
hi after testing the variables i am getting the error
What error??
I get this Error - Pls help
{
"error": {
"message": "The model `text-davinic-003` does not exist",
"type": "invalid_request_error",
"param": null,
"code": "model_not_found"
}
}
Can you check the api document
It’s shows insufficient quota whether I changed my friends account also anyone can help me with this
Create with other email and phone
@@learnservicenowwithravi which model to use now since davinci one is deprecated now?
hi ravi, i mailed you regarding the image integration and currently also unable to fetch data from this chatgpt integration altough i follow every steps you did but on clicking give me answer button its not giving the result...kindly help regarding also plz reply on the mail....have a good day :
)
Sure
Hi Ravi, thank you for the information and useful vedio. I have configured everything as you did. When I am testing my method then I am getting response, however when I click on the UI action then I do not get logs, I guess script does not run. my script :
function runClientCode() {
gsftSubmit(null, g_form.getElement(), "run_server");
}
gs.info("IAMIN");
var r = new sn_ws.RESTMessageV2('ChatGPT', 'ChatGPTResponse');
r.setStringParameterNoEscape("temp", '0.5');
r.setStringParameterNoEscape("prompt", current.u_ask_any_question);
r.setStringParameterNoEscape("max_tokens", '1024');
r.setStringParameterNoEscape("model", 'text-davinci-003');
var response = r.execute();
gs.info("IAMIN1");
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
gs.info("IAMIN2 Response " + responseBody);
var jsonObj = JSON.parse(responseBody);
var reply = jsonObj.choices[0].text;
current.u_your_answer = reply;
current.update();
action.setRedirectURL(current);
The the comments where I have changed the script… do check that and change the script accordingly
I have pin the comment also doncheck
Do*
Now it is working, thanks a lot for quick response.
It's not showing the output in the form
Share your code
Hi Ravi
It's not working, and i checked many videos of all the videos. is the same as like your video, but now this method is not help full Can you please help me
Does anyone have this error ?
{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
"param": null,
"code": null
}
}
Its common.. try with new email-id
hi ravi, please provide videos required for the servicenow javascript from scratch.
Its there in development series you can check the video
I'm getting Error 429
Ping the error details
Same error I get
Hi @Ravi Gourav Can We integrate SonarQube with Service Now
Sure
i get "Basic authentication failed for user: mid_server_atr" when running from the UI Action, From the Rest Message setup the test works no problem. Below is my script.
function runClientCode() {
gsftSubmit(null, g_form.getElement(), "run_server");
if (typeof window == 'undefined')
runRestAPICode();
}
function runRestAPICode() {
var r = new sn_ws.RESTMessageV2('Chat GPT', 'GetGPTResponse');
r.setStringParameterNoEscape('model', 'text-davinci-003');
r.setStringParameterNoEscape('prompt', current.u_ask_any_question);
r.setStringParameterNoEscape('max_token', '1024');
r.setStringParameterNoEscape('temp', '0.5');
var response = r.execute();
var responseBody = response.getBody();
var httpStatus = response.getStatusCode();
gs.log("The response body== " + responseBody);
}
Did you generated the bearer token from chat gpt
I'm getting the below 429 error in the REST Message
{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
"param": null,
"code": "insufficient_quota"
}
}
Use different email ids
I use different email id, but the issue is not solved
Hi am getting the following error in .log
The response body== {"id":"cmpl-78ppn9kqT1K9rZhpPi9OrXtLsqdBS","object":"text_completion","created":1682340231,"model":"text-davinci-003","choices":[{"text":",
I am using the \"Get Current User\" action in my Flow.
The action is returning the user's display name, but I need to get the user's email address.
Is there any way to get the user's email address from this action?
Thanks!","index":0,"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":1,"completion_tokens":61,"total_tokens":62}}
Can you tell me what is the request body?