Skip to content

Commit

Permalink
import error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
saminegash committed Jul 2, 2024
1 parent 764dcdc commit d5d4df5
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 16 deletions.
Empty file added src/log.txt
Empty file.
52 changes: 40 additions & 12 deletions src/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ langchain = "0.2.5"
langchain-community = "0.2.5"
python-dotenv = "^1.0.0"
unstructured = "^0.10.11"
openai = "^0.28.0"
langchain-openai = "0.1.13"
openai = "1.35.7"
chromadb = "^0.4.8"
tiktoken = ">=0.6.0,<1.0"
pinecone-client = "^2.2.2"
Expand Down
7 changes: 4 additions & 3 deletions src/sherpa_ai/test_utils/llms.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import re

import pytest # type: ignore
from langchain_community.chat_models import BaseLanguageModel # type: ignore
from langchain_community.llms import ChatOpenAI # type: ignore
from langchain_core.language_models import BaseLanguageModel # type: ignore
from langchain_community.chat_models import ChatOpenAI # type: ignore
from langchain_core.language_models import FakeListLLM # type: ignore

from sherpa_ai.models.chat_model_with_logging import ChatModelWithLogging
Expand All @@ -16,7 +16,8 @@ def get_fake_llm(filename) -> FakeListLLM:
for line in f:
responses.append(json.loads(line))
# restore new line characters
responses = [response["output"].replace("\\n", "\n") for response in responses]
responses = [response["output"].replace(
"\\n", "\n") for response in responses]
return FakeListLLM(responses=responses)


Expand Down

0 comments on commit d5d4df5

Please sign in to comment.