12 lines
272 B
QBasic
12 lines
272 B
QBasic
PARAM query AS STRING
|
|
|
|
existing = SEARCH PRODUCTS query, 1
|
|
IF LEN(existing) > 0 THEN
|
|
RETURN existing[0]
|
|
END IF
|
|
|
|
info = LLM "Extract product info: " + query + ". Return JSON {name, category, brand, description}"
|
|
info.is_active = true
|
|
|
|
SAVE "products", info
|
|
RETURN info
|