Skip to content

Conversation

@marcocastignoli
Copy link
Member

@marcocastignoli marcocastignoli commented Sep 9, 2025

This PR implements the BigQuery component and page. There are two main parts in this PR:

  • A BigQuery editor to execute queries: it calls a new API on server that uses our GCP service account to execute queries and display results to the user in a table
  • A LLM SQL generator: the user can use natural language to ask questions about the Sourcify database. E.g. "Which contract is the most popular contract by contract name?"

The LLM SQL generator uses free models from Openrouter. Free usage is on our openrouter key that we embed in the browser. Users can use their own private key to use payed models.

@netlify
Copy link

netlify bot commented Sep 9, 2025

Deploy Preview for sourcify-ui ready!

Name Link
🔨 Latest commit 5cb2838
🔍 Latest deploy log https://app.netlify.com/projects/sourcify-ui/deploys/68c7a98630c19e00086738f9
😎 Deploy Preview https://deploy-preview-28--sourcify-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kuzdogan
Copy link
Member

Two things I can see here:

  1. We should definitely make Examples a bit more prominent.
  2. I think the BigQuery playground can be directly on the landing page. If not the whole playground, it should have a call to action and a button to go there, and it shouldn't occupy precious space on the header bar.
  3. Can't we pull the available openrouter models to a dropdown instead of asking user to go to openrouter and copy-paste from there?
  4. I still can't click "Generate SQL" with the default free model.
image

@marcocastignoli
Copy link
Member Author

  1. ok, good idea
  2. ok, makes sense. Where would you put the call to action?
  3. free models always change, so I thought it would be better to just manage them with a select. Also they are a lot. My idea is actually to hide the model selection even more
  4. You cannot click it because there is no environment variable set yet

@kuzdogan
Copy link
Member

How about we embed it directly after the verified contracts graph? Not even linking out to a separate page.

@marcocastignoli marcocastignoli marked this pull request as ready for review September 10, 2025 08:38
@kuzdogan kuzdogan self-assigned this Sep 11, 2025
Copy link
Member

@kuzdogan kuzdogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done some layout changes and adding submission with ctrl+enter.

Just a few questions on the code.

But in general amazing work!

@marcocastignoli
Copy link
Member Author

marcocastignoli commented Sep 11, 2025

  • add a notice that this is just a playground and it has limits
  • point people to how they can use the "full version": bigquery and notebook

@kuzdogan kuzdogan merged commit 2a75d0f into staging Sep 15, 2025
5 checks passed
@kuzdogan kuzdogan deleted the bigquery-explorer branch September 15, 2025 05:56
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

Successfully merging this pull request may close these issues.

3 participants