Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
baskaryan committed Feb 22, 2024
2 parents fc19d2c + b5f8cf9 commit 499ce1f
Show file tree
Hide file tree
Showing 160 changed files with 6,389 additions and 909 deletions.
9 changes: 9 additions & 0 deletions .github/actions/people/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@
login
avatarUrl
url
... on User {
twitterUsername
}
}
title
createdAt
Expand All @@ -123,6 +126,9 @@
login
avatarUrl
url
... on User {
twitterUsername
}
}
state
}
Expand All @@ -139,6 +145,7 @@ class Author(BaseModel):
login: str
avatarUrl: str
url: str
twitterUsername: Union[str, None] = None


# Issues and Discussions
Expand Down Expand Up @@ -501,6 +508,7 @@ def get_top_users(
"login": commentor,
"count": count,
"avatarUrl": author.avatarUrl,
"twitterUsername": author.twitterUsername,
"url": author.url,
}
)
Expand Down Expand Up @@ -550,6 +558,7 @@ def get_top_users(
"login": login,
"count": contributors[login], #+ question_commentors[login],
"avatarUrl": user.avatarUrl,
"twitterUsername": user.twitterUsername,
"url": user.url,
}
)
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ jobs:
NVIDIA_API_KEY: ${{ secrets.NVIDIA_API_KEY }}
GOOGLE_SEARCH_API_KEY: ${{ secrets.GOOGLE_SEARCH_API_KEY }}
GOOGLE_CSE_ID: ${{ secrets.GOOGLE_CSE_ID }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
EXA_API_KEY: ${{ secrets.EXA_API_KEY }}
NOMIC_API_KEY: ${{ secrets.NOMIC_API_KEY }}
WATSONX_APIKEY: ${{ secrets.WATSONX_APIKEY }}
Expand Down
13 changes: 6 additions & 7 deletions cookbook/rag_fusion.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
"source": [
"## Setup\n",
"\n",
"For this example, we will use Pinecone and some fake data"
"For this example, we will use Pinecone and some fake data. To configure Pinecone, set the following environment variable:\n",
"\n",
"- `PINECONE_API_KEY`: Your Pinecone API key"
]
},
{
Expand All @@ -29,11 +31,8 @@
"metadata": {},
"outputs": [],
"source": [
"import pinecone\n",
"from langchain_community.vectorstores import Pinecone\n",
"from langchain_openai import OpenAIEmbeddings\n",
"\n",
"pinecone.init(api_key=\"...\", environment=\"...\")"
"from langchain_pinecone import PineconeVectorStore"
]
},
{
Expand Down Expand Up @@ -64,7 +63,7 @@
"metadata": {},
"outputs": [],
"source": [
"vectorstore = Pinecone.from_texts(\n",
"vectorstore = PineconeVectorStore.from_texts(\n",
" list(all_documents.values()), OpenAIEmbeddings(), index_name=\"rag-fusion\"\n",
")"
]
Expand Down Expand Up @@ -162,7 +161,7 @@
"metadata": {},
"outputs": [],
"source": [
"vectorstore = Pinecone.from_existing_index(\"rag-fusion\", OpenAIEmbeddings())\n",
"vectorstore = PineconeVectorStore.from_existing_index(\"rag-fusion\", OpenAIEmbeddings())\n",
"retriever = vectorstore.as_retriever()"
]
},
Expand Down
2 changes: 1 addition & 1 deletion docs/api_reference/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def run(self):
class_or_func_name = self.arguments[0]
links = imported_classes.get(class_or_func_name, {})
list_node = nodes.bullet_list()
for doc_name, link in links.items():
for doc_name, link in sorted(links.items()):
item_node = nodes.list_item()
para_node = nodes.paragraph()
link_node = nodes.reference()
Expand Down
11 changes: 4 additions & 7 deletions docs/api_reference/create_api_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ def _construct_doc(

for module in namespaces:
_members = members_by_namespace[module]
classes = _members["classes_"]
functions = _members["functions"]
classes = [el for el in _members["classes_"] if el["is_public"]]
functions = [el for el in _members["functions"] if el["is_public"]]
if not (classes or functions):
continue
section = f":mod:`{package_namespace}.{module}`"
Expand All @@ -244,9 +244,6 @@ def _construct_doc(
"""

for class_ in sorted(classes, key=lambda c: c["qualified_name"]):
if not class_["is_public"]:
continue

if class_["kind"] == "TypedDict":
template = "typeddict.rst"
elif class_["kind"] == "enum":
Expand All @@ -264,7 +261,7 @@ def _construct_doc(
"""

if functions:
_functions = [f["qualified_name"] for f in functions if f["is_public"]]
_functions = [f["qualified_name"] for f in functions]
fstring = "\n ".join(sorted(_functions))
full_doc += f"""\
Functions
Expand Down Expand Up @@ -354,7 +351,7 @@ def main() -> None:
# Skip any hidden directories
# Some of these could be present by mistake in the code base
# e.g., .pytest_cache from running tests from the wrong location.
if not dir.startswith("."):
if dir.startswith("."):
print("Skipping dir:", dir)
continue

Expand Down
Loading

0 comments on commit 499ce1f

Please sign in to comment.