From dbe642c659ba8a03601f9c25e6a617d97bd263fe Mon Sep 17 00:00:00 2001 From: Bogdan Buduroiu Date: Thu, 29 Aug 2024 19:07:24 +0800 Subject: [PATCH] feat: HTTP only host --- pinecone/handler.go | 2 +- pinecone/index.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pinecone/handler.go b/pinecone/handler.go index 449e8be..044b53e 100644 --- a/pinecone/handler.go +++ b/pinecone/handler.go @@ -32,7 +32,7 @@ func (h *Handler) CreateIndex(w http.ResponseWriter, r *http.Request) { State: "Ready", } } - index.Host = r.Host + index.Host = fmt.Sprintf("http://%s", r.Host) index.Namespaces = make(map[string]map[string]*Vector) h.Index = &index diff --git a/pinecone/index.go b/pinecone/index.go index e962a7c..f89518a 100644 --- a/pinecone/index.go +++ b/pinecone/index.go @@ -13,7 +13,7 @@ type IndexStatus struct { type Index struct { Name string `json:"name"` - Dimension int64 `json:"dimension"` + Dimension int `json:"dimension"` Metric string `json:"metric"` Status IndexStatus `json:"status"` Host string `json:"host"`