Comments (3)
I used something like the below - you have to update the 'embedding_function' variable in query_data.py with the model argument to get it to work though. I've pasted both below
def get_embedding_function():
embeddings = OpenAIEmbeddings(model="text-embedding-3-large")
return embeddings
in query_data.py
embedding_function = OpenAIEmbeddings(model="text-embedding-3-large")
from rag-tutorial-v2.
Yup, as @jaimeelincoln says, you can use the OpenAI embedding helper function directly rather than having to do it via the client:
https://python.langchain.com/v0.1/docs/integrations/text_embedding/openai/
OpenAIEmbeddings(model="text-embedding-3-large")
from rag-tutorial-v2.
The embedding need input but i cannot see it being passed to it in the script in populate_database.py
Also, your code is trying to create the actual embedding itself, which is why you need the input (text and model). But get_embedding_function
is supposed to return the function/class for embedding (which is what something like the OpenAIEmbeddings
class does).
from rag-tutorial-v2.
Related Issues (8)
- Embedding failed HOT 6
- LICENSE file?
- Not issue but need embedding for azure openai
- Problem: Check for Compatibility: Ensure that the version of langchain and langsmith you are using is compatible with the version of pydantic installed. Sometimes specific versions of these packages require specific versions of pydantic. HOT 2
- Explicitly adding the id
- Add langchain_community to requirements HOT 1
- How do I invoke the AWS Bedrock model instead of the Ollama model in query_data.py?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rag-tutorial-v2.