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

DX-968: Vector Client for Cloudflare #32

Merged
merged 10 commits into from
Jun 12, 2024

Conversation

fahreddinozcan
Copy link
Collaborator

No description provided.

Copy link

linear bot commented Jun 3, 2024

ogzhanolguncu
ogzhanolguncu previously approved these changes Jun 7, 2024
CahidArda
CahidArda previously approved these changes Jun 7, 2024
CahidArda
CahidArda previously approved these changes Jun 10, 2024
env?: { UPSTASH_VECTOR_REST_URL: string; UPSTASH_VECTOR_REST_TOKEN: string },
config?: Omit<IndexConfig, "url" | "token">
): Index {
let url: string | undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe just this:

const token = env.UPSTASH_VECTOR_REST_URL ?? process?.env.UPSTASH_VECTOR_REST_UR

if (!token) throw new Error("xxx")

token = env.UPSTASH_VECTOR_REST_TOKEN;
if (!token) {
throw new Error(
"Unable to find environment variable: `UPSTASH_VECTOR_REST_TOKEN`. Please add it via `wrangler secret put UPSTASH_VECTOR_REST_TOKEN`"
Copy link
Contributor

@ogzhanolguncu ogzhanolguncu Jun 10, 2024

Choose a reason for hiding this comment

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

I guess this is a leftover from cloudflare?

@ogzhanolguncu ogzhanolguncu merged commit 5bfa8c4 into master Jun 12, 2024
1 check passed
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