Closed TeomanEgeSelcuk closed 6 months ago
Hey @TeomanEgeSelcuk thanks for the detailed report! I think something got messed up here https://github.com/fynnfluegge/codeqai/commit/7f15456c430408c959f0944ef33d37fbeab8d895
Will have a closer look asap!
No worries, take your time excited to use codeqai
. I tried to implement it after this YouTuber made the video: https://www.youtube.com/watch?v=RA_jYH05avk&t=23s&ab_channel=WorldofAI
I have the same problem when trying to run codeqai I get the same problem, try downgrading to the library "sentence-transformers==2.2.2" but I couldn't get it to work.
experienced same error even with sentence-transformers.
then, this worked for me
from langchain_community.embeddings import HuggingFaceEmbeddings
embeddings = HuggingFaceEmbeddings(model_name="hkunlp/instructor-xl")
Hey @shreyahegde18 thanks for suggesting the solution! I am a bit under water this week, would appreciate it a lot if you don't mind to raise a PR with this fix 🙂
@fynnfluegge I will surely give it a try :)
Hey @fynnfluegge I have opened a PR with a fix that resolved this issue. I hope it's going to work fine for everyone who wants to use codeqai :)
Reopen, found this https://github.com/PromtEngineer/localGPT/issues/722
The sentence-transformers version 2.2.2 must be specified explicitly.
Fixed in https://github.com/fynnfluegge/codeqai/commit/526d50c6ccbca6f535255ceb18f9617f2ff51870
Thanks @shreyahegde18 for suggesting HuggingFaceEmbeddings(model_name="hkunlp/instructor-xl")
Description
When attempting to run the
codeqai app
command on my project directory, I encountered a TypeError related to an unexpected keyword argument 'token' in theINSTRUCTOR._load_sbert_model()
method. This occurred after configuringcodeqai
to use local embedding models (Instructor-Large) and selectinggpt-4
as the remote LLM for chat functionalities.Steps to Reproduce
codeqai
using pip.codeqai configure
and configured the tool as follows:codeqai search
by runningcodeqai search
in the terminal.Expected Behavior
I expected the
codeqai search
to launch successfully and allow me to interact with my codebase through the bash terminal.Actual Behavior
The application failed to start due to a TypeError in the
INSTRUCTOR._load_sbert_model()
method.Environment
Additional Context
The issue seems to be related to the integration between
codeqai
, thelangchain-community
package, andsentence-transformers
. Given that all components are up to date, it appears there might be an incompatibility or a bug in the waycodeqai
is utilizing thesentence-transformers
library, specifically with theINSTRUCTOR
model configuration.