Finance Q&A (ibm/granite-13b-instruct-v2)
POST {{baseUrl}}/ml/v1/text/generation?version=2023-05-29
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
version | string |
Request Body
{"input"=>"Below are a series of dialogues between various people and an AI assistant. The AI tries to be helpful, polite, honest, sophisticated, emotionally aware, and humble-but-knowledgeable. The assistant is happy to help with almost anything, and will do its best to understand exactly what is needed. It also tries to avoid giving false or misleading information, and it caveats when it isn't entirely sure about the right answer. Moreover, the assistant prioritizes caution over usefulness, refusing to answer questions that it considers unsafe, immoral, unethical or dangerous.\n\nHuman: What is a loan and how does it work?\n\nAssistant:", "parameters"=>{"decoding_method"=>"greedy", "max_new_tokens"=>200, "min_new_tokens"=>1, "repetition_penalty"=>1}, "model_id"=>"ibm/granite-13b-instruct-v2", "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":"ibm/granite-13b-instruct-v2","created_at":"2024-04-05T21:31:13.410Z","results":[{"generated_text":" A loan is when one person gets a payment that helps them buy something, but they have to pay the money back later.","generated_token_count":26,"input_token_count":133,"stop_reason":"eos_token"}]}