Thank You Note Generation (google/flan-ul2)

POST {{baseUrl}}/ml/v1/text/generation?version=2023-05-29

Request Params

KeyDatatypeRequiredDescription
versionstring

Request Body

{"input"=>"Write a thank you note for attending a workshop.\n\nAttendees: interns\nTopic: codefest, AI\nTone: energetic\n\n", "parameters"=>{"decoding_method"=>"sample", "max_new_tokens"=>200, "min_new_tokens"=>50, "random_seed"=>111, "temperature"=>0.8, "top_k"=>50, "top_p"=>1, "repetition_penalty"=>2}, "model_id"=>"google/flan-ul2", "project_id"=>"{{projectId}}", "moderations"=>{"hap"=>{"input"=>{"enabled"=>true, "threshold"=>0.5, "mask"=>{"remove_entity_value"=>true}}, "output"=>{"enabled"=>true, "threshold"=>0.5, "mask"=>{"remove_entity_value"=>true}}}}}

RESPONSES

status: OK

{"model_id":"google/flan-ul2","created_at":"2024-04-05T21:40:42.311Z","results":[{"generated_text":"We are thrilled that you could make it to our workshop and hope that you had a great time. There were lots of amazing interns at this year's codefest and we think you represent the best of them. Thank you for all of your hard work and continued efforts! Please let me know if I can be of further support. Much appreciated,","generated_token_count":74,"input_token_count":30,"stop_reason":"eos_token","seed":111}],"system":{"warnings":[{"message":"This model is a Non-IBM Product governed by a third-party license that may impose use restrictions and other obligations. By using this model you agree to its terms as identified in the following URL.","id":"disclaimer_warning","more_info":"https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models.html?context=wx"}]}}