Questions tagged [openaiembeddings]

24 questions
0
votes
0 answers

Azure Redis Semantic Cache connection error

I am trying to connect to the redis semantic cache using the below code import redis import langchain from langchain.cache import RedisSemanticCache from langchain.embeddings import OpenAIEmbeddings from dotenv import load_dotenv # Connect to the…
0
votes
0 answers

Get data from multiple collection of PGVector using langchain

I have multiple collection in PGVector DB COLLECTION_NAME1 = "mydata1" COLLECTION_NAME2 = "mydata2" Now I am using PGVector method to load data from it based on the collection embeddings = OpenAIEmbeddings() store1 = PGVector( …
0
votes
0 answers

Getting errors while building a PDF QA with OPEN AI & Langchain

I am trying to use Langchain & AI. So, I have installed all the libraries and tried to write the below code with Langchain documentation. But I seem to face some errors which I am not able to resolve. Here is my code: import os from…
0
votes
0 answers

Dynamically selecting prompts in langchain

I am looking to use multiple prompts for different scenarios. I found the following in the documentation but apparently it doesn't work with vector store search. chain = MultiPromptChain.from_prompts(OpenAI(), prompt_infos, verbose=True) Any way I…
0
votes
0 answers

HDBSCAN clusters sentence embeddings in one cluster that are way too far apart

I have the task to cluster utterances to a chatbot based on sentence similarity in order to find out which are topics users ask about and how important those topics are. I am converting the utterances into sentence embeddings using the…
0
votes
0 answers

How do I create multiple chroma db's and query individual dbs?

I am doing that with multiple text files, so that each text files get 1 db. And then query them individually I would want to query then individually. from langchain.vectorstores import Chroma from langchain.embeddings import OpenAIEmbeddings from…
0
votes
0 answers

Getting 'Unauthorized' Result from Azure OpenAI Embeddings API

I have the following code that returns 'Unauthorized'. I am puzzled. Identical code with OpenAI Key (not Azure) and OpenAI URL produce 200 results. What am I doing wrong? The only thing is: Am I authorized to place a call from West US (California)…
Leon
  • 165
  • 12
0
votes
1 answer

Can weaviate provide only the matching portion(s) of a relevant vector

Context I have a set of articles which have been vectorised and loaded into Weaviate using "vectorizer": "text2vec-openai" I then query as follows: Find articles which are close matches to a question…
David
  • 7,652
  • 21
  • 60
  • 98
-1
votes
1 answer

How to achieve Text Embedding by BERT?

I am tring to build a Text Embedding function by BERT. It said that BERT can do text embedding. However, I cannot find the embedding function on BERT's tutorial. Here is the link I looked up:…
1
2