Skip to content

Commit 799faec

Browse files
Merge pull request #102 from edubotics-ai/Farid-patch
Langchain release patch
2 parents edc6f13 + 02a1d52 commit 799faec

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
name: Publish to PyPI
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
tags:
8-
- "v*"
4+
release:
5+
types: [published]
96

107
jobs:
118
deploy:

edubotics_core/chat/langchain/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def create_stuff_documents_chain(
240240
document_separator: str = DEFAULT_DOCUMENT_SEPARATOR,
241241
) -> Runnable[Dict[str, Any], Any]:
242242
"""Create a chain for passing a list of Documents to a model."""
243-
_validate_prompt(prompt)
243+
_validate_prompt(prompt, "context")
244244
_document_prompt = document_prompt or DEFAULT_DOCUMENT_PROMPT
245245
_output_parser = output_parser or StrOutputParser()
246246

setup.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from setuptools import setup, find_packages
2+
import os
23

34
# Read the contents of requirements.txt
45
with open("requirements.txt") as f:
@@ -7,9 +8,17 @@
78
with open("README.md") as f:
89
readme = f.read()
910

11+
# Tag is in the format v0.1.0, so we need to remove the v
12+
git_tag = os.environ.get("GITHUB_REF_NAME", "")
13+
14+
if git_tag.startswith("v"):
15+
version = git_tag[1:]
16+
else:
17+
version = git_tag
18+
1019
setup(
1120
name="edubotics-core",
12-
version="0.1.0",
21+
version=version,
1322
packages=find_packages(),
1423
package_dir={"edubotics-core": "edubotics_core"},
1524
python_requires=">=3.7",

0 commit comments

Comments
 (0)