Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error logging #54

Open
camilogutierrez opened this issue Jun 25, 2024 · 0 comments
Open

Error logging #54

camilogutierrez opened this issue Jun 25, 2024 · 0 comments

Comments

@camilogutierrez
Copy link

camilogutierrez commented Jun 25, 2024

Issue: JSON Syntax Error in Looker ExtGenAI Logging Filter

Description

While executing an SQL query in Looker ExtGenAI logging filter, we encountered a JSON syntax error. The error message indicates that there is an invalid control character (U+000A - line feed) in the JSON string, which needs to be escaped.

Query

#Looker ExtGenAI logging filter Fields - v: 3.0
BEGIN
INSERT INTO llm.explore_logging(creation_timestamp, userInput, modelFields, llmResult, thumbsUpDownNone) VALUES(
    CURRENT_TIMESTAMP(),
    '¿Cuales son los tipos de tecnología?',
    JSON '[{"label":"Cuenta Atributo","name":"dm_cuenta_m.cuenta_atributo","type":"string","description":"Indica el atributo de la cuenta (ejemplo influencer, vip, prensa, etc)."},{"label":"Cuenta Ciclo Facturacion","name":"dm_cuenta_m.cuenta_ciclo_facturacion","type":"string","description":""},{"label":"Cuenta Cliente Ciclo Facturacion","name":"dm_cliente_m.cliente_ciclo_facturacion","type":"string","description":""},{"label":"Cuenta Cliente Codigo Integracion","name":"dm_cliente_m.cliente_codigo_integracion","type":"string","description":"Corresponde al Código de cliente de 10 dígitos."},{"label":"Cuenta Cliente Codigo Integracion Texto","name":"dm_cliente_m.cliente_codigo_integracion_texto","type":"string","description":""},{"label":"Cuenta Cliente Cuit","name":"dm_cliente_m.cliente_cuit","type":"string","description":""},{"label":"Cuenta Cliente Email","name":"dm_cliente_m.cliente_email","type":"string","description":""},{"label":"Cuenta Cliente Razon Social","name":"dm_cliente_m.cliente_razon_social","type":"string","description":""},{"label":"Cuenta Cliente SRCId","name":"dm_cliente_m.cliente_srcid","type":"string","description":""},{"label":"Cuenta Cliente Segmento 1 Nombre","name":"dm_cliente_"}]',
    JSON '{"field_names":["ft_parque.producto_adquirido_tecnologia"],"filters":{},"sorts":[],"limit":"500","pivots":[]}',
    0
);
SELECT 1;
END

Error Message

Query error: Invalid JSON literal: syntax error while parsing value - invalid string: control character U+000A (LF) must be escaped to \u000A or \n; last read: '"Negocio Fija/Movil - Cuenta Total Clientes unicos.<U+000A>' at [6:17]

Steps to Reproduce

  1. Execute the above SQL query in the Looker ExtGenAI logging filter.
  2. Observe the JSON syntax error in the response.

Expected Behavior

The SQL query should execute successfully without any JSON syntax errors.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant