Skip to content

Commit

Permalink
chore: update langchain version (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
fynnfluegge authored Feb 4, 2024
1 parent 62b3a1f commit 7f15456
Show file tree
Hide file tree
Showing 6 changed files with 223 additions and 69 deletions.
8 changes: 8 additions & 0 deletions codeqai/app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import argparse
import os
import subprocess
import warnings

from dotenv import dotenv_values, load_dotenv
from rich.console import Console
Expand Down Expand Up @@ -62,6 +63,13 @@ def env_loader(env_path, required_keys=None):


def run():
if not subprocess.run(
["git", "rev-parse", "--is-inside-work-tree"], capture_output=True
).stdout:
print("Not a git repository. Exiting.")
exit()
warnings.filterwarnings("ignore", category=DeprecationWarning)

parser = argparse.ArgumentParser()
parser.add_argument(
"action",
Expand Down
6 changes: 3 additions & 3 deletions codeqai/embeddings.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import inquirer
from langchain.embeddings import (HuggingFaceEmbeddings,
HuggingFaceInstructEmbeddings)
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain_community.embeddings import (HuggingFaceEmbeddings,
HuggingFaceInstructEmbeddings)
from langchain_openai import OpenAIEmbeddings

from codeqai import utils
from codeqai.constants import EmbeddingsModel
Expand Down
5 changes: 3 additions & 2 deletions codeqai/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import inquirer
from langchain.callbacks.manager import CallbackManager
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from langchain.chat_models import AzureChatOpenAI, ChatOpenAI
from langchain.llms import LlamaCpp, Ollama
from langchain_community.chat_models import AzureChatOpenAI
from langchain_community.llms import LlamaCpp, Ollama
from langchain_openai import ChatOpenAI

from codeqai import utils
from codeqai.constants import LlmHost
Expand Down
2 changes: 1 addition & 1 deletion codeqai/vector_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import inquirer
from langchain.embeddings.base import Embeddings
from langchain.schema import Document
from langchain.vectorstores import FAISS
from langchain_community.vectorstores import FAISS
from yaspin import yaspin

from codeqai import utils
Expand Down
Loading

0 comments on commit 7f15456

Please sign in to comment.