Mon | Tue | Wed | Thu | Fri | Sat | Sun |
---|---|---|---|---|---|---|
Our ChatGPTAPI class facilitates seamless communication with the ChatGPT API, allowing you to retrieve data based on user queries directly within your Salesforce environment.
public with sharing class ChatGptHandler {
private static String API_KEY = 'ENTER YOUR API KEY';
public static void getData(String searchString){
String seachQueryTrimed = (searchString).trim();
Http http = new Http();
String reqBody = '{"model": "text-davinci-003","prompt":"'
+seachQueryTrimed+
'","max_tokens": 4000,"temperature": 0,'
+'"stream": false,"top_p": 0.5}';
HttpRequest request = new HttpRequest();
request.setEndpoint('https://api.openai.com/v1/completions');
request.setMethod('POST');
request.setHeader('Authorization', 'Bearer '+ API_KEY);
request.setHeader('Content-Type', 'application/json;charset=UTF-8');
request.setBody(reqBody);
HttpResponse response = http.send(request);
System.debug(response.getBody());
}
}
1 | Solmaz Aliyeva | 395 |
2 | Derya Baskol | 220 |
1 | Derya Baskol | 12701 |
2 | Solmaz Aliyeva | 5677 |
3 | Kemal Ozdemir | 4433 |
4 | Okan Ozcelik | 2150 |
5 | Efe Kadioglu | 1797 |
6 | Ayse Yilmaz | 1667 |
7 | Emel Sarli | 1365 |
8 | Mehmet Akin | 1355 |
9 | Yasin Aksu | 1295 |
10 | Ridvan Ay | 1205 |
11 | Tugbag Tamer Yilgin | 960 |
12 | Ahmet Derdiyok | 925 |
13 | Zeynep SEMİZ | 780 |
14 | Nora Arslan | 620 |
15 | Ercan Özyanar | 570 |
16 | Gul Kullu | 550 |
17 | Fatma Ablak Oren | 495 |
18 | Zeynep Yildiz | 475 |
19 | EA | 450 |
20 | Osman Demirel | 440 |
1 | Derya Baskol | 32711 |
2 | Solmaz Aliyeva | 14607 |
3 | Kemal Ozdemir | 7447 |
4 | Emel Sarli | 5457 |
5 | Tugbag Tamer Yilgin | 3617 |
6 | Ayse Yilmaz | 3597 |
7 | Okan Ozcelik | 3220 |
8 | Efe Kadioglu | 3112 |
9 | Osman Demirel | 2942 |
10 | Gul Kullu | 2747 |
11 | Ridvan Ay | 2745 |
12 | Mehmet Akin | 2685 |
13 | Yasin Aksu | 2550 |
14 | Fatma Ablak Oren | 2400 |
15 | Zeynep SEMİZ | 1915 |
16 | Ahmet Derdiyok | 1870 |
17 | Sevilay Zencirkiran | 1672 |
18 | Aysun Bilgic | 1510 |
19 | Ercan Özyanar | 1460 |
20 | Bahar Erdagi | 1400 |
1 | Derya Baskol | 41686 |
2 | Engin Basturk | 26436 |
3 | Fatih | 24248 |
4 | Zehra Bulut | 21578 |
5 | ZY | 18016 |
6 | Solmaz Aliyeva | 17866 |
7 | Alaattin Kokcu | 16962 |
8 | Burcu Derdiyok | 16611 |
9 | Zeynep Yildiz | 16605 |
10 | Cavidan | 16514 |
11 | Sebahattin Dalgic | 15756 |
12 | Ozlem Helva | 15428 |
13 | Esra Balci | 15343 |
14 | Bahar Erdagi | 15276 |
15 | Okan Ozcelik | 15228 |
16 | Ada Lozzy | 14765 |
17 | Hakan Can | 13232 |
18 | Mehmet Y | 13024 |
19 | Emel Sarli | 12984 |
20 | Asli Kucukyazici | 12026 |