চ্যাট জিপিটি এক্সচেঞ্জের নতুন ঘোষণা

লেখক:চাওঝাং, তারিখ: ২০২৩-০৪-০৩ ১৩ঃ৪৯ঃ১৩
ট্যাগঃ

এক্সচেঞ্জের সময়গত অভিন্নতার সমস্যা সমাধানের একটি কার্যকর উপায় হল চ্যাট জিপিটি ব্যবহার করে প্রক্রিয়াজাতকরণ করা, নিয়মিত অভিব্যক্তি ব্যবহার করে ক্লান্তিকর ম্যাচিং এড়ানো। বিজ্ঞপ্তিগুলি সরাসরি চ্যাট জিপিটিতে দেওয়া, যা এটিকে বিভিন্ন এক্সচেঞ্জের সময় বিন্যাসগুলি সনাক্ত এবং প্রক্রিয়া করতে দেয়, এটি একটি সুবিধাজনক এবং দক্ষ অ্যাপ্লিকেশন দৃশ্য।

আপনি openaiCompletions ফাংশনে বিজ্ঞপ্তি পাঠ্য প্রেরণ করে ChatGPT-এর শক্তিশালী ক্ষমতা ব্যবহার করে বিভিন্ন এক্সচেঞ্জের আপলোড করা বিজ্ঞপ্তি থেকে গুরুত্বপূর্ণ তথ্য বের করতে পারেন। এই পদ্ধতিটি কেবল প্রক্রিয়াকরণের দক্ষতাই বাড়ায় না বরং বিভিন্ন সময় ফরম্যাটের জন্য সামঞ্জস্যও বাড়ায়।

এই ফাংশনটি ব্যবহার করার আগে, OPENAI_API_KEY নীতিমালাটি সেট করতে হবে, যা আপনার ওপেনএআই এপিআই কী সরবরাহ করতে ব্যবহৃত হয়। আপনি আপনার নিজের কীটি ব্যবহার করে gpt-3.5-turbo API অ্যাক্সেস করতে পারেন।

ফাংশন নামঃ openaiCompletions

কার্যকারিতা বর্ণনাঃ এই ফাংশনটি ওপেনএআই এর জিপিটি -3.5-টার্বো মডেলকে কল করে ইনপুট করা বিজ্ঞপ্তির বিষয়বস্তু এক্সচেঞ্জের অবিলম্বে নতুন লেনদেনের জোড়ার বিজ্ঞপ্তি কিনা তা নির্ধারণ করে। যদি বিজ্ঞপ্তিটি যোগ্য হয় তবে ফাংশনটি একটি JSON বস্তু প্রদান করে, যা সফলতা চিহ্ন, লেনদেনের জোড়া এবং বেইজিং সময় অন্তর্ভুক্ত করে; যদি বিজ্ঞপ্তিটি অযোগ্য হয় তবে এটি কেবল একটি ব্যর্থতা চিহ্ন প্রদান করে।

ইনপুট প্যারামিটারঃ content: বিজ্ঞপ্তির বিষয়বস্তু যা বিচার করা প্রয়োজন।

আউটপুটঃ JSON অবজেক্ট, যা নিম্নলিখিত কী-মানের জোড়া ধারণ করেঃ

success: Boolean value, যা নির্দেশ করে যে ফলাফলটি সফল হয়েছে কিনা। pair: ((শুধুমাত্র success যদি true হয় তবে বিদ্যমান) স্ট্রিং অ্যারে, যা লেনদেনের জোড়া বোঝায়। time: ((শুধুমাত্র success যদি true হয় তবে বিদ্যমান) স্ট্রিং, ঘোষণা প্রকাশের সময় নির্দেশ করে, এটি বেইজিং সময় ((UTC+8) এ রূপান্তরিত হয়েছে। ফাংশন এক্সিকিউশন প্রক্রিয়াঃ

gpt-3.5-turbo API এর অনুরোধের URL, অনুরোধের শিরোনাম এবং অনুরোধের তথ্য সংজ্ঞায়িত করুন। HttpQuery পদ্ধতিটি কল করুন, যা অনুরোধের ডেটা JSON ফর্ম্যাটে gpt-3.5-turbo API-তে পাঠায়। gpt-3.5-turbo API দ্বারা ফিরে আসা JSON ডেটা বিশ্লেষণ করে এবং প্রয়োজনীয় তথ্য বের করে। JSON অবজেক্টগুলিকে পুনরুদ্ধার করে।

ব্যবহারের উদাহরণঃ

var content = "某交易所宣布,将于2023年3月22日12:00(UTC+8)上线ID/USDT交易对。";
var result = openaiCompletions(content);
Log(result);

আউটপুটঃ

{
  "success": true,
  "pair": ["ID_USDT"],
  "time": "2023-03-22 12:00:00"
}



// 封装的函数
function openaiCompletions(content) {
    var url = 'https://api.openai.com/v1/chat/completions';
    var headers = 'Content-Type: application/json\nAuthorization: Bearer ' + OPENAI_API_KEY;
    var data = {
        model: 'gpt-4',//如果api没有gpt-4的权限,这里可以修改为gpt-3.5-turbo
        messages: [
          {role: "system", "content": '判断公告内容,是交易所现货上新交易对的公告吗?如果是你只需要以json的{"success":true,"pair":["ID_USDT"],"time":"2023-03-22 12:00:00"}格式,时间转换为北京时间utc+8,如果不是返回{"success":false}'},
          {role: 'user', content: content}
          ]
    };

    var response = HttpQuery(url, JSON.stringify(data),null,headers,false);
    response = JSON.parse(response)
    return JSON.parse(response.choices[0].message.content);
}

// 使用示例
function main() {
    let announcement = `Fellow Binancians,
Binance will list Radiant Capital (RDNT) in the Innovation Zone and will open trading for these spot trading pairs at 2023-03-30 07:30 (UTC):
New Spot Trading Pairs: RDNT/BTC, RDNT/USDT, RDNT/TUSD
Users can now start depositing RDNT in preparation for trading
Withdrawals for RDNT will open at 2023-03-31 07:30 (UTC)
RDNT Listing Fee: 0 BNB
Users will enjoy zero maker fees on the RDNT/TUSD trading pairs until further notice
Note: The withdrawal open time is an estimated time for users’ reference. Users can view the actual status of withdrawals on the withdrawal page.
In addition, Binance will add RDNT as a new borrowable asset with these new margin pairs on Isolated Margin, within 48 hours from 2023-03-30 07:30 (UTC):
New Isolated Margin Pairs: RDNT/USDT
Please refer to Margin Data for a list of the most updated marginable assets and further information on specific limits and rates.
What is Radiant Capital (RDNT)?
Radiant Capital is a decentralized omnichain money market protocol. Users can stake their collateral on one of the major chains and borrow from another chain. RDNT is the utility token for liquidity mining and governance.
Reminder:
The Innovation Zone is a dedicated trading zone where users are able to trade new, innovative tokens that are likely to have higher volatility and pose a higher risk than other tokens.
Before being able to trade in the Innovation Zone, all users are required to visit the web version of the Innovation Zone trading page to carefully read the Binance Terms of Use and complete a questionnaire as part of the Initial Disclaimer. Please note that there will not be any trading restrictions on trading pairs in the Innovation Zone.
RDNT is a relatively new token that poses a higher than normal risk, and as such will likely be subject to high price volatility. Please ensure that you exercise sufficient risk management, have done your own research in regards to RDNT’s fundamentals, and fully understand the project before opting to trade the token.
Details:
Radiant Capital Website
RDNT Token Contract Addresses - Arbitrum, BNB Chain
Fees
Rules
Thanks for your support!
Binance Team
2023-03-30`
Log(openaiCompletions(announcement))

}


আরো

xxs1xxs1এটা কি নতুন কিছু হতে পারে?

চুংফেন ৯১না, না!