Closed RogNas closed 3 months ago
@RogNas I am going to improve the logging today and then I will get you to have another go.
@RogNas Please try this new version, which has additional logging in the output:
https://github.com/IBM/WatsonX-SDK-Db2-IBMi/blob/main/src/generate.sql
Also, note, we are moving to that repo (IBM/WatsonX-SDK-Db2-IBMi) instead of this one for all new code changes.
@RogNas We just pushed another fix which should yield a working API. Thanks!
generate does not return anything (no errors & no results): Here are the details: Here is the SQL statement that is failing select ltrim("generated_text") from json_table(QSYS2.HTTP_POST( 'https://us-south.ml.cloud.ibm.com/ml/v1/text/generation?version=2023-07-07', json_object('model_id': 'meta-llama/llama-2-13b-chat', 'input': 'what is the capital of New York?', 'parameters': json_object('max_new_tokens': 500, 'time_limit': 1000), 'space_id': watsonx.spaceid), json_object('headers': json_object('Authorization': 'Bearer ' concat watsonx.JobBearerToken, 'Content-Type': 'application/json', 'Accept': 'application/json')) ), 'lax $.results[*]' columns( "generated_text" varchar(10000) ccsid 1208 )); I made sure that wastonx.spaceid and wastonx,JobBearerToken are good. I am getting 0 rows back. Also, the call watsonx.getModels() is working fine. How can I debug/trace to find why the text generation is not returning anything and not giving an error?
Side notes: