Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix link and file scraper bug #286

Merged
merged 5 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/sherpa_ai/models/sherpa_base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
CallbackManagerForLLMRun,
)
from langchain.chat_models.base import BaseChatModel
from langchain.llms.openai import OpenAI
from langchain.schema import BaseMessage, ChatResult
from pydantic import BaseModel

from sherpa_ai.database.user_usage_tracker import UserUsageTracker
from langchain.chat_models import ChatOpenAI


class SherpaOpenAI(OpenAI):
class SherpaOpenAI(ChatOpenAI):
team_id: typing.Optional[str] = None
user_id: typing.Optional[str] = None

Expand Down
2 changes: 1 addition & 1 deletion src/sherpa_ai/scrape/file_scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def prompt_reconstruct(self, file_info, data=str):
"status": "error",
"message": "token ammount of a file has to be less than {}",
}
elif data_token_size > 3000:
else:
chunk_summary = chunk_and_summarize_file(
file_format=file_info["filetype"],
file_name=file_info["name"],
Expand Down