লাইন বাছাই
কোনো শব্দ বা বাক্যাংশ থাকা লাইনগুলো রাখুন বা সরান।
বেস URL: https://happytails.ai · পাবলিক API সংযুক্ত নেই
প্রক্রিয়াকরণ
API-তে অনুরোধ পাঠালে আপনার দেওয়া তথ্য সার্ভারে প্রক্রিয়া করা হয়।
অনুরোধের প্যারামিটার
একটি JSON অবজেক্ট পাঠান। অচেনা প্রপার্টি থাকলে অনুরোধটি প্রত্যাখ্যান করা হয়। কোনো অপশন বাদ দিলে নিচে দেওয়া ডিফল্ট মান ব্যবহৃত হয়। সংখ্যা ও বুলিয়ান মান উদ্ধৃতি চিহ্ন ছাড়া JSON মান হিসেবে লিখুন।
input একটি স্ট্রিং, যা শুরুতে খালি থাকে এবং সর্বোচ্চ 1,000,000 অক্ষর নিতে পারে। ফল বদলাতে ইনপুট বা সেটিংস পরিবর্তন করুন। টাইপ করার সময়ও ফল আপডেট হয়।
এই এন্ডপয়েন্টে files অ্যারে গ্রহণ করা হয় না।
বিকল্প
options.findstringলাইনে যে লেখা থাকবে
options.actionstringকাজ
সফল অনুরোধের প্রতিক্রিয়া
HTTP 200 প্রতিক্রিয়ায় tool ও result থাকে। পাঠ্য থাকে result.text-এ। পার্স করা JSON-ও result.data-এ থাকতে পারে। তৈরি ফাইলগুলো result.files-এ থাকে এবং প্রতিটিতে name, mime, bytes ও base64 থাকে। সংরক্ষণের আগে বাইটগুলো ডিকোড করুন। কোনো অপারেশন অন্য ধরনের ফল দিলে ফাইলের অ্যারে খালি থাকা এবং পাঠ্যের মান null হওয়া বৈধ।
আউটপুটের সম্পূর্ণ স্কিমা
{
"type": "object",
"required": [
"tool",
"result"
],
"properties": {
"tool": {
"type": "string"
},
"result": {
"type": "object",
"required": [
"text",
"files"
],
"properties": {
"text": {
"type": [
"string",
"null"
]
},
"data": {
"description": "Parsed JSON when the textual result is JSON."
},
"name": {
"type": "string"
},
"mime": {
"type": "string"
},
"files": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"mime",
"bytes",
"base64"
],
"properties": {
"name": {
"type": "string"
},
"mime": {
"type": "string"
},
"bytes": {
"type": "integer"
},
"base64": {
"type": "string",
"contentEncoding": "base64"
}
}
}
}
}
}
}
}সীমা ও ত্রুটি
এই এন্ডপয়েন্টে নিচের সীমাগুলো প্রযোজ্য। কাজের বিবরণে দেওয়া ফরম্যাট, পৃষ্ঠা, সময়কাল ও মডেল সংক্রান্ত অতিরিক্ত সীমাও প্রযোজ্য। ব্রাউজারের ইন্টারফেসের সীমা API-এর সীমা থেকে ভিন্ন হতে পারে।
request_bytes- 8388608
input_characters- 1000000
files_bytes- 5242880
max_files- 0
timeout_seconds- 12
অবৈধ অনুরোধে error অবজেক্ট ফেরত আসে, যাতে code ও message থাকে। দেখুন HTTP স্ট্যাটাস, পুনরায় চেষ্টা, সময়সীমা ও একসঙ্গে একাধিক অনুরোধ। অনুরোধের কাজ শেষ হলে একই উত্তরে ফলাফল ফেরত আসে।
অনুরোধের সম্পূর্ণ স্কিমা
JSON স্কিমা খুলুন
{
"type": "object",
"additionalProperties": false,
"properties": {
"input": {
"type": "string",
"maxLength": 1000000,
"default": "",
"description": "Plain text input. File tools use files instead unless otherwise documented."
},
"options": {
"type": "object",
"additionalProperties": false,
"properties": {
"find": {
"type": "string",
"description": "Contains",
"default": ""
},
"action": {
"type": "string",
"description": "Action",
"default": "Keep matching",
"enum": [
"Keep matching",
"Remove matching"
]
}
}
}
}
}ব্রাউজারে কাজ স্বয়ংক্রিয় করতে কেন্দ্রীয় WebMCP নির্দেশিকা ব্যবহার করে দেখুন ব্রাউজারটি আসলে কোন টুলগুলো উপলভ্য করে।
curl https://happytails.ai/api/v1/tools/filter-lines/run \
-H "Content-Type: application/json" \
--data '{"input": "red apple\ngreen pear", "options": {"find": "red"}}'const payload = {
"input": "red apple\ngreen pear",
"options": {
"find": "red"
}
};
const response = await fetch(
"https://happytails.ai/api/v1/tools/filter-lines/run",
{
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload)
}
);
const data = await response.json();
if (!response.ok) throw new Error(data.error.message);
console.log(data.result);import json
from urllib.request import Request, urlopen
payload = json.loads('{"input": "red apple\\ngreen pear", "options": {"find": "red"}}')
request = Request(
"https://happytails.ai/api/v1/tools/filter-lines/run",
data=json.dumps(payload).encode(),
headers={"Content-Type": "application/json"},
)
with urlopen(request, timeout=200) as response:
result = json.load(response)
print(result){
"input": "red apple\ngreen pear",
"options": {
"find": "red"
}
}আপনার অ্যাপ্লিকেশন অনুযায়ী API-এর অরিজিন ও ইনপুটের মান বদলান।
{
"tool": "filter-lines",
"result": {
"text": "red apple",
"files": [],
"name": "result.txt",
"mime": "text/plain;charset=utf-8"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Unknown request property. See the tool input schema."
}
}