Skip to content

Conversation

@xqliu
Copy link
Contributor

@xqliu xqliu commented Oct 10, 2024

…ssary log

Summary

Build a Retrieval Augmented Generation (RAG) AI doc

Screenshots (optional)

If no such null check, it will shows follow error when no match in the Vectorize index was found.

URL: http://localhost:8787/?text=What%27s%20the%20best%20pizza
Screenshot:

image

Text: TypeError: Cannot read properties of undefined (reading 'id')

Which was caused by the follow line

   const vecId = vectorQuery.matches[0].id

Documentation checklist

  • The documentation style guide has been adhered to.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

@daisyfaithauma daisyfaithauma mentioned this pull request Oct 28, 2024
3 tasks
@github-actions github-actions bot added size/s and removed size/xs labels Nov 11, 2024
@daisyfaithauma daisyfaithauma merged commit 49750d4 into cloudflare:production Nov 11, 2024
7 checks passed
@workers-devprod workers-devprod added the contribution [Holopin] Recognizes a docs contribution, big or small label Nov 11, 2024
@holopin-bot
Copy link

holopin-bot bot commented Nov 11, 2024

Congratulations @xqliu, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cm3dc721641540cl3wyv8hvrf

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

harshil1712 pushed a commit that referenced this pull request Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution [Holopin] Recognizes a docs contribution, big or small product:workers-ai Workers AI: https://developers.cloudflare.com/workers-ai/ size/s

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants