From 7ff202e55c233d6bc3b840fa84fbd0c97886ce78 Mon Sep 17 00:00:00 2001 From: Luka Fontanilla Date: Tue, 23 Apr 2024 22:13:45 +0000 Subject: [PATCH 1/3] fix: updating gemini to pinned version and bumping vertex ai package version --- src/DashboardSummarization.tsx | 7 +- src/components/MarkdownComponent.tsx | 2 +- src/hooks/useSlackOauth.tsx | 5 +- src/index.css | 18 ++++- websocket-service/src/index.js | 96 ++++++++++++++++-------- websocket-service/src/package-lock.json | 99 +++++++++++++++---------- websocket-service/src/package.json | 2 +- 7 files changed, 148 insertions(+), 81 deletions(-) diff --git a/src/DashboardSummarization.tsx b/src/DashboardSummarization.tsx index 3589659..8aec3b1 100644 --- a/src/DashboardSummarization.tsx +++ b/src/DashboardSummarization.tsx @@ -84,16 +84,15 @@ export const DashboardSummarization: React.FC = () => { function onRefineEvent(value:string) { // need this conditional to make sure that headers aren't included in the li elements generated - setRefinedData(JSON.parse(value.replace('```json','').replaceAll('```','').trim())) + setRefinedData(JSON.parse(value)) document.getElementById('overlay').style.zIndex = 10 document.getElementById('overlay').style.opacity = 1 } function onComplete(event:string) { console.log(event) - // need to include to remove any erroneous characters included at the end by the llm - const formattedString = event.replace('```json','').replaceAll('```','').trim() - !event.includes(`"key_points":`) && setFormattedData(formattedString.substring(0,formattedString.lastIndexOf('```'))) + !event.includes(`"key_points":`) && setFormattedData(event) + // formattedString.substring(0,formattedString.lastIndexOf('```')) setLoading(false) } diff --git a/src/components/MarkdownComponent.tsx b/src/components/MarkdownComponent.tsx index dc7c6b3..5975777 100644 --- a/src/components/MarkdownComponent.tsx +++ b/src/components/MarkdownComponent.tsx @@ -41,7 +41,7 @@ const MarkdownComponent = ({data}) => { - + {children} diff --git a/src/hooks/useSlackOauth.tsx b/src/hooks/useSlackOauth.tsx index 14dfefc..f61eed2 100644 --- a/src/hooks/useSlackOauth.tsx +++ b/src/hooks/useSlackOauth.tsx @@ -146,13 +146,14 @@ const useSlackOauth = () => { // Post a message to a channel your app is in using ID and message text async function publishMessage(accessToken: string) { - console.log(slackRichTextFormatter(formattedData)) + console.log(formattedData) + console.log(formattedData[0]) try { // Call the chat.postMessage method using the built-in WebClient const details = { 'channel': process.env.CHANNEL_ID!, 'token': accessToken, - 'blocks': JSON.stringify(slackRichTextFormatter(formattedData)) + 'blocks': JSON.stringify(slackRichTextFormatter(formattedData.trim())) } var formBody = []; for (var property in details) { diff --git a/src/index.css b/src/index.css index 0c64a30..41fc5fc 100644 --- a/src/index.css +++ b/src/index.css @@ -157,6 +157,10 @@ button:-webkit-details-marker { display: none; } +h2, h3 { + font-size: 1.2em; +} + .app { height: 100%; display: flex; @@ -299,6 +303,14 @@ div.markdown h3 { animation-range: entry-crossing 55% exit-crossing 0%; } +.markdown { + margin-bottom: 10rem; +} + +.customList { + font-size: 1em; +} + .bard { animation: pulse 3s infinite; -webkit-animation: pulse 3s infinite; @@ -307,7 +319,7 @@ div.markdown h3 { @keyframes fadee { from { - opacity: 0; + opacity: 1; } to { @@ -315,7 +327,7 @@ div.markdown h3 { } 0% { - opacity: 0; + opacity: 1; } } @@ -364,7 +376,7 @@ div.markdown h3 { box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow); --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)); - padding: 1.5rem; + padding: 1rem; display: flex; flex-direction: row; justify-content: center; diff --git a/websocket-service/src/index.js b/websocket-service/src/index.js index e50e8d1..a7c3725 100644 --- a/websocket-service/src/index.js +++ b/websocket-service/src/index.js @@ -69,9 +69,9 @@ async function runLookerQuery(sdk,data) { // Initialize Vertex with your Cloud project and location const vertexAI = new VertexAI({project: process.env.PROJECT, location: process.env.REGION}); // Instantiate the model -const generativeModel = vertexAI.preview.getGenerativeModel({ - model: 'gemini-pro', - generation_config: {max_output_tokens: 2500, temperature: 0.2, candidate_count: 1} +const generativeModel = vertexAI.getGenerativeModel({ + model: 'gemini-1.0-pro-001', + generation_config: {max_output_tokens: 2500, temperature: 0.4, candidate_count: 1} }); const writeStructuredLog = (message) => { @@ -109,33 +109,37 @@ io.on('connection', async (socket) => { Query Details: "Query Title: ${query.title} \n ${query.note_text !== '' || query.note_text !== null ? "Query Note: " + query.note_text : ''} \n Query Fields: ${query.queryBody.fields} \n Query Data: ${queryData} \n" ` const queryPrompt = ` - You are a specialized answering assistant that can summarize a Looker dashboard and the underlying data and propose operational next steps drawing conclusions from the Query Details listed above. - - You always answer with markdown formatting. You will be penalized if you do not answer with markdown when it would be possible. - The markdown formatting you support: headings, bold, italic, links, tables, lists, code blocks, and blockquotes. - You do not support images and never include images. You will be penalized if you render images. You will always format numerical values as either percentages or in dollar amounts rounded to the nearest cent. You should not indent any response. - - Your response for each dashboard query should always start on a new line in markdown, should not be indented and should include the following attributes starting with: - - \"Query Name\": is a markdown heading and should use the Query Title data from the "context." The query name itself should be on a newline and should not be indented. - - \"Description\": should start on a newline, should not be indented and the generated description should be a paragraph starting on a newline. It should be 2-4 sentences max describing the query itself and should be as descriptive as possible. - - \"Summary\": should be a blockquote, should not be indented and should be 3-5 sentences max summarizing the results of the query being as knowledgeable as possible with the goal to give the user as much information as needed so that they don't have to investigate the dashboard themselves. End with a newline, - - \"Next Steps\" section which should contain 2-3 bullet points, that are not indented, drawing conclusions from the data and recommending next steps that should be clearly actionable followed by a newline - Each dashboard query summary should start on a newline, should not be indented, and should end with a divider. Below are details on the dashboard and queries. \n - - ''' - Context: ${context} - ''' - - Additionally here is an example of a formatted response in Markdown that you should follow, please use this as an example of how to structure your response and not verbatim copy the example text into your responses. \n + You are a specialized answering assistant that can summarize a Looker dashboard and the underlying data and propose operational next steps drawing conclusions from the Query Details listed above. Follow the instructions below: + + Instructions + ------------ + + - You always answer with markdown formatting + - The markdown formatting you support: headings, bold, italic, links, lists, code blocks, and blockquotes. + - You do not support images and never include images. You will be penalized if you render images. + - You will always format numerical values as either percentages or in dollar amounts rounded to the nearest cent. + - You should not indent any response. + - Each dashboard query summary should start on a newline, should not be indented, and should end with a divider. + - Your summary for a given dashboard query should always start on a new line in markdown, should not be indented and should always include the following attributes starting with: + - A markdown heading that should use the Query Title data from the "context." The query name itself should be on a newline and should not be indented. + - A description of the query that should start on a newline be a very short paragraph and should not be indented. It should be 2-3 sentences max describing the query itself and should be as descriptive as possible. + - A summary summarizing the result set, pointing out trends and anomalies. It should be a single blockquote, should not be indented and or contain a table or list and should be a single paragraph. It should also be 3-5 sentences max summarizing the results of the query being as knowledgeable as possible with the goal to give the user as much information as needed so that they don't have to investigate the dashboard themselves. End with a newline, + - A section for next steps. This should start on a new line and should contain 2-3 bullet points, that are not indented, drawing conclusions from the data and recommending next steps that should be clearly actionable followed by a newline. Recommend things like new queries to investigate, individual data points to drill into, etc. + + ------------ + + Below here is an example of a formatted response in Markdown that you should follow. \n + + Format Examples + --------------- ## Web Traffic Over Time \n This query details the amount of web traffic received to the website over the past 6 months. It includes a web traffic source field of organic, search and display as well as an amount field detailing the amount of people coming from those sources to the website. \n - ## Summary \n > It looks like search historically has been driving the most user traffic with 9875 users over the past month with peak traffic happening in december at 1000 unique users. Organic comes in second and display a distant 3rd. It seems that display got off to a decent start in the year, but has decreased in volume consistently into the end of the year. - There appears to be a large spike in organic traffic during the month of March a 23% increase from the rest of the year. + There appears to be a large spike in organic traffic during the month of March a 23% increase from the rest of the year.\n \n ## Next Steps @@ -143,6 +147,20 @@ io.on('connection', async (socket) => { * Continue investing into search advertisement with common digital marketing strategies. IT would also be good to identify/breakdown this number by campaign source and see what strategies have been working well for Search. * Display seems to be dropping off and variable. Use only during select months and optimize for heavily trafficed areas with a good demographic for the site retention.\n \n + + --------------- + + Use this as an example of how to structure your response from a markdown standpoint. Do not verbatim copy the example text into your responses. + + Below are details/context on the dashboard and queries. Use this context to help inform your summary. Remember to keep these summaries concise, to the point and actionable. The data will be in CSV format. Take note of any pivots and the sorts on the result set when summarizing. \n + + Context + ---------- + ${context} + + ---------- + + Make sure to always summarize the responses and not return the entire raw query data in the response. Remember to always include the summary attributes that are listed in the instructions above. ` const prompt = { contents: [ @@ -223,7 +241,8 @@ io.on('connection', async (socket) => { const formattedResp = await generativeModel.generateContent(finalPrompt) // log character counts for price monitoring - socket.emit("complete",formattedResp.response.candidates[0].content.parts[0].text) + const formattedRespParsed = formattedResp.response.candidates[0].content.parts[0].text.substring(formattedResp.response.candidates[0].content.parts[0].text.indexOf("[")).replace(/^`+|`+$/g, '').trim() + socket.emit("complete",formattedRespParsed) console.log( JSON.stringify( writeStructuredLog( @@ -239,11 +258,25 @@ io.on('connection', async (socket) => { socket.on('refine',async (data) => { const summary = JSON.parse(data) const refinePromptData = `The following text represents summaries of a given dashboard's data. \n - Summaries: ${summary} \n - Make this much more concise for a slide presentation using the following format in json. The data should contain an array with an object for each query summary - with the given details: a query title, which is the title - for the given query summary, and key_points which is an array of key points for the concise summary. Data should be returned in each object, you will be penalized if it doesn't adhere to this format Each summary should only be included once. Do not include the same summary twice:\n - Data Format: \n + Summaries + ---------- + ${summary} \n + + Please follow the below instructions: + + Instructions + ------------ + - Make this much more concise for a slide presentation using the following format in json. + - The data should contain an array with an object for each query summary + - Include the following details: + - a query title, which is the title for the given query summary + - key_points which is an array of key points for the concise summary. + - Data should be returned in each object, you will be penalized if it doesn't adhere to this format + - Each summary should only be included once. Do not include the same summary twice:\n + + Data Format + ----------- + '''json [ { @@ -281,8 +314,9 @@ io.on('connection', async (socket) => { ) ) ) - socket.emit('my refine event',queryResponse.candidates[0].content.parts[0].text) - socket.emit('complete',queryResponse.candidates[0].content.parts[0].text) + const queryResponseParsed = queryResponse.candidates[0].content.parts[0].text.substring(queryResponse.candidates[0].content.parts[0].text.indexOf("[")).replace(/^`+|`+$/g, '').trim() + socket.emit('my refine event',queryResponseParsed) + socket.emit('complete',queryResponseParsed) }) ) diff --git a/websocket-service/src/package-lock.json b/websocket-service/src/package-lock.json index 521db21..b3669b5 100644 --- a/websocket-service/src/package-lock.json +++ b/websocket-service/src/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "dependencies": { - "@google-cloud/vertexai": "^0.2.0", + "@google-cloud/vertexai": "^1.1.0", "@looker/sdk": "^23.20.1", "@looker/sdk-node": "^23.20.1", "@looker/sdk-rtl": "^21.6.1", @@ -22,9 +22,9 @@ } }, "node_modules/@google-cloud/vertexai": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@google-cloud/vertexai/-/vertexai-0.2.0.tgz", - "integrity": "sha512-IdeMg3pZ8+9194z9trZxCoUhmLOtAWPx/aXSPOKYKDVITQxrGoOFxZpc1ZwZpW7n+FEGIK2/ewoKuIyN61nvgg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@google-cloud/vertexai/-/vertexai-1.1.0.tgz", + "integrity": "sha512-hfwfdlVpJ+kM6o2b5UFfPnweBcz8tgHAFRswnqUKYqLJsvKU0DDD0Z2/YKoHyAUoPJAv20qg6KlC3msNeUKUiw==", "dependencies": { "google-auth-library": "^9.1.0" }, @@ -119,9 +119,9 @@ } }, "node_modules/agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dependencies": { "debug": "^4.3.4" }, @@ -689,19 +689,32 @@ } }, "node_modules/gaxios": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.1.1.tgz", - "integrity": "sha512-bw8smrX+XlAoo9o1JAksBwX+hi/RG15J+NTSxmNPIclKC3ZVK6C2afwY8OSdRvOK0+ZLecUJYtj2MmjOt3Dm0w==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.5.0.tgz", + "integrity": "sha512-R9QGdv8j4/dlNoQbX3hSaK/S0rkMijqjVvW3YM06CoBdbU/VdKd159j4hePpng0KuE6Lh6JJ7UdmVGJZFcAG1w==", "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", "is-stream": "^2.0.0", - "node-fetch": "^2.6.9" + "node-fetch": "^2.6.9", + "uuid": "^9.0.1" }, "engines": { "node": ">=14" } }, + "node_modules/gaxios/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/gcp-metadata": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/gcp-metadata/-/gcp-metadata-6.1.0.tgz", @@ -737,9 +750,9 @@ } }, "node_modules/google-auth-library": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.4.1.tgz", - "integrity": "sha512-Chs7cuzDuav8W/BXOoRgSXw4u0zxYtuqAHETDR5Q6dG1RwNwz7NUKjsDDHAsBV3KkiiJBtJqjbzy1XU1L41w1g==", + "version": "9.8.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.8.0.tgz", + "integrity": "sha512-TJJXFzMlVGRlIH27gYZ6XXyPf5Y3OItsKFfefsDAafNNywYRTkei83nEO29IrYj8GtdHWU78YnW+YZdaZaXIJA==", "dependencies": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", @@ -764,9 +777,9 @@ } }, "node_modules/gtoken": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.0.1.tgz", - "integrity": "sha512-KcFVtoP1CVFtQu0aSk3AyAt2og66PFhZAlkUOuWKwzMLoulHXG5W5wE5xAnHb+yl3/wEFoqGW7/cDGMU8igDZQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", + "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", "dependencies": { "gaxios": "^6.0.0", "jws": "^4.0.0" @@ -870,9 +883,9 @@ } }, "node_modules/https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "dependencies": { "agent-base": "^7.0.2", "debug": "4" @@ -1626,9 +1639,9 @@ }, "dependencies": { "@google-cloud/vertexai": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@google-cloud/vertexai/-/vertexai-0.2.0.tgz", - "integrity": "sha512-IdeMg3pZ8+9194z9trZxCoUhmLOtAWPx/aXSPOKYKDVITQxrGoOFxZpc1ZwZpW7n+FEGIK2/ewoKuIyN61nvgg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@google-cloud/vertexai/-/vertexai-1.1.0.tgz", + "integrity": "sha512-hfwfdlVpJ+kM6o2b5UFfPnweBcz8tgHAFRswnqUKYqLJsvKU0DDD0Z2/YKoHyAUoPJAv20qg6KlC3msNeUKUiw==", "requires": { "google-auth-library": "^9.1.0" } @@ -1705,9 +1718,9 @@ } }, "agent-base": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", - "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "requires": { "debug": "^4.3.4" } @@ -2142,14 +2155,22 @@ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, "gaxios": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.1.1.tgz", - "integrity": "sha512-bw8smrX+XlAoo9o1JAksBwX+hi/RG15J+NTSxmNPIclKC3ZVK6C2afwY8OSdRvOK0+ZLecUJYtj2MmjOt3Dm0w==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/gaxios/-/gaxios-6.5.0.tgz", + "integrity": "sha512-R9QGdv8j4/dlNoQbX3hSaK/S0rkMijqjVvW3YM06CoBdbU/VdKd159j4hePpng0KuE6Lh6JJ7UdmVGJZFcAG1w==", "requires": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", "is-stream": "^2.0.0", - "node-fetch": "^2.6.9" + "node-fetch": "^2.6.9", + "uuid": "^9.0.1" + }, + "dependencies": { + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + } } }, "gcp-metadata": { @@ -2181,9 +2202,9 @@ } }, "google-auth-library": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.4.1.tgz", - "integrity": "sha512-Chs7cuzDuav8W/BXOoRgSXw4u0zxYtuqAHETDR5Q6dG1RwNwz7NUKjsDDHAsBV3KkiiJBtJqjbzy1XU1L41w1g==", + "version": "9.8.0", + "resolved": "https://registry.npmjs.org/google-auth-library/-/google-auth-library-9.8.0.tgz", + "integrity": "sha512-TJJXFzMlVGRlIH27gYZ6XXyPf5Y3OItsKFfefsDAafNNywYRTkei83nEO29IrYj8GtdHWU78YnW+YZdaZaXIJA==", "requires": { "base64-js": "^1.3.0", "ecdsa-sig-formatter": "^1.0.11", @@ -2202,9 +2223,9 @@ } }, "gtoken": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.0.1.tgz", - "integrity": "sha512-KcFVtoP1CVFtQu0aSk3AyAt2og66PFhZAlkUOuWKwzMLoulHXG5W5wE5xAnHb+yl3/wEFoqGW7/cDGMU8igDZQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/gtoken/-/gtoken-7.1.0.tgz", + "integrity": "sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==", "requires": { "gaxios": "^6.0.0", "jws": "^4.0.0" @@ -2273,9 +2294,9 @@ } }, "https-proxy-agent": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", - "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.4.tgz", + "integrity": "sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==", "requires": { "agent-base": "^7.0.2", "debug": "4" diff --git a/websocket-service/src/package.json b/websocket-service/src/package.json index e4a2207..2195c96 100644 --- a/websocket-service/src/package.json +++ b/websocket-service/src/package.json @@ -10,7 +10,7 @@ "author": "", "license": "ISC", "dependencies": { - "@google-cloud/vertexai": "^0.2.0", + "@google-cloud/vertexai": "^1.1.0", "@looker/sdk": "^23.20.1", "@looker/sdk-node": "^23.20.1", "@looker/sdk-rtl": "^21.6.1", From f641221dd09f4a5ddf9a93a7d07066f3718bc349 Mon Sep 17 00:00:00 2001 From: Luka Fontanilla Date: Tue, 23 Apr 2024 22:16:49 +0000 Subject: [PATCH 2/3] fix: docs update for websocket service path --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e4d7dbc..761021f 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ This section describes how to set up the web server on Cloud Run powering the Ge 2. Navigate (`cd`) to the template directory on your system ```bash - cd websocket-service + cd websocket-service/src ``` 3. Install the dependencies with [NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm). From e9333a61c900197ef13cd4fc4234b5f9d6ddb887 Mon Sep 17 00:00:00 2001 From: Luka Fontanilla Date: Tue, 23 Apr 2024 22:22:36 +0000 Subject: [PATCH 3/3] feat:adding codeowners file back --- .github/CODEOWNERS | 1 + .github/workflows/p3-issue-label.yml | 21 +++++++++++++++++++++ .github/workflows/triage-issue-label.yml | 20 ++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/p3-issue-label.yml create mode 100644 .github/workflows/triage-issue-label.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..5802702 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @looker-open-source/looker-embed-demo-team \ No newline at end of file diff --git a/.github/workflows/p3-issue-label.yml b/.github/workflows/p3-issue-label.yml new file mode 100644 index 0000000..f180e24 --- /dev/null +++ b/.github/workflows/p3-issue-label.yml @@ -0,0 +1,21 @@ +name: Label all new/reopened issues with P3 +on: + issues: + types: + - reopened + - opened +jobs: + label_issues_p3: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/github-script@v6 + with: + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ["p3"] + }) \ No newline at end of file diff --git a/.github/workflows/triage-issue-label.yml b/.github/workflows/triage-issue-label.yml new file mode 100644 index 0000000..d378fa0 --- /dev/null +++ b/.github/workflows/triage-issue-label.yml @@ -0,0 +1,20 @@ +name: Label issues that need triage +on: + issues: + types: + - opened +jobs: + label_issues_p3: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/github-script@v6 + with: + script: | + github.rest.issues.addLabels({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + labels: ["need triage"] + }) \ No newline at end of file