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

[WIP] Version 4 with better open source model support and no langchain #223

Merged
merged 16 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from 9 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
278 changes: 118 additions & 160 deletions README.md

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ python-dotenv
pymupdf
build
types-requests
numpy
langchain_openai
langchain_community
faiss-cpu
22 changes: 22 additions & 0 deletions paperqa/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
from .docs import Answer, Docs, PromptCollection, Doc, Text, Context
from .version import __version__
from .llms import (
LLMModel,
EmbeddingModel,
LangchainEmbeddingModel,
OpenAIEmbeddingModel,
LangchainLLMModel,
OpenAILLMModel,
LlamaEmbeddingModel,
NumpyVectorStore,
LangchainVectorStore,
SentenceTransformerEmbeddingModel,
)

__all__ = [
"Docs",
Expand All @@ -9,4 +21,14 @@
"Doc",
"Text",
"Context",
"LLMModel",
"EmbeddingModel",
"OpenAIEmbeddingModel",
"OpenAILLMModel",
"LangchainLLMModel",
"LlamaEmbeddingModel",
"SentenceTransformerEmbeddingModel",
"LangchainEmbeddingModel",
"NumpyVectorStore",
"LangchainVectorStore",
]
5 changes: 1 addition & 4 deletions paperqa/contrib/zotero.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
from pathlib import Path
from typing import List, Optional, Union, cast

try:
from pydantic.v1 import BaseModel
except ImportError:
from pydantic import BaseModel
from pydantic import BaseModel

try:
from pyzotero import zotero
Expand Down
Loading
Loading