Databricks OpenAI LLM Model - Part 1

 
Create a table
CREATE TABLE asset_digital_ai (
   query_key string NOT NULL,
   query STRING NOT NULL,
   answer_key string ,
   answer STRING  ,
   query_datetime TIMESTAMP NOT NULL,
   answer_datetime TIMESTAMP
);
 
INSERT INTO Asset_Digital_AI (Query_Key, Query, Answer, Query_DateTime, Answer_DateTime) VALUES (md5('Where is Perth?'), 'Where is Perth?', null, current_date(), null )
 
 
select * from _rtio_assetdigital_dev.beltscan.Asset_Digital_AI

Create a table

CREATE TABLE asset_digital_ai (
   query_key string NOT NULL,
   query STRING NOT NULL,
   answer_key string ,
   answer STRING  ,
   query_datetime TIMESTAMP NOT NULL,
   answer_datetime TIMESTAMP
);
 
INSERT INTO Asset_Digital_AI (Query_Key, Query, Answer, Query_DateTime, Answer_DateTime) VALUES (md5('Where is Perth?'), 'Where is Perth?', null, current_date(), null )
 
 
select * from _rtio_assetdigital_dev.beltscan.Asset_Digital_AI
 

The full Python code: LLM-AI.txt (6,9 kB)