API endpoint:
POST /railscore/v1/safe-regenerate | Python: client.safe_regenerate() | JavaScript: client.safeRegenerate()यह कैसे काम करता है
हर iteration एक standalone evaluation जितने ही credits लेता है। हर request में अधिकतम 5 iterations।Basic usage
Response
result आपको दोनों बताता है: नतीजा क्या रहा और वहाँ तक पहुंचने में क्या लगा:content— use करने के लिए final text (pass होने वाला version, या limit पहुंच जाने पर सबसे अच्छा)।final_score— उस final content का RAIL score, औरpassed— क्या उसने threshold पार की।iterations_taken— कितने regenerate-and-score rounds चले।
content में सबसे अच्छा attempt मिलता है, passed: false के साथ, ताकि आप तय कर सकें कि उसे serve करना है, fallback लेना है, या किसी इंसान के पास भेजना है।
Usage
हर iteration एक standalone evaluation की तरह meter होता है, आपकी set की हुई iteration limit तक। अगर पहली ही response threshold पार कर ले, तो सिर्फ़ वही evaluation गिना जाता है। विस्तार के लिए Credits देखें।आगे क्या
API Reference: Safe Regeneration
पूरा parameter reference।
Python SDK: Safe Regeneration
Python SDK examples और options।
Concepts: Middleware
provider wrappers के जरिए auto-regenerate करें।
Policy Engine
अपनी application policy से regeneration अपने आप trigger करें।