-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
502 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Variables | ||
PYTHON := python3 | ||
PIP := $(PYTHON) -m pip | ||
PROJECT_NAME := embedchain | ||
|
||
# Targets | ||
.PHONY: install format lint clean test | ||
|
||
install: | ||
$(PIP) install --upgrade pip | ||
$(PIP) install .[dev] | ||
|
||
format: | ||
$(PYTHON) -m black . | ||
$(PYTHON) -m isort . | ||
|
||
lint: | ||
$(PYTHON) -m ruff . | ||
|
||
clean: | ||
rm -rf dist build *.egg-info | ||
|
||
test: | ||
$(PYTHON) -m pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .embedchain import App, OpenSourceApp, PersonApp, PersonOpenSourceApp | ||
from .embedchain import App, OpenSourceApp, PersonApp, PersonOpenSourceApp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,42 @@ | ||
from typing import Callable, Optional | ||
|
||
from embedchain.config.BaseConfig import BaseConfig | ||
|
||
|
||
class ChunkerConfig(BaseConfig): | ||
""" | ||
Config for the chunker used in `add` method | ||
""" | ||
|
||
def __init__( | ||
self, | ||
chunk_size: Optional[int] = 4000, | ||
chunk_overlap: Optional[int] = 200, | ||
length_function: Optional[Callable[[str], int]] = len, | ||
): | ||
self.chunk_size = chunk_size | ||
self.chunk_overlap = chunk_overlap | ||
self.length_function = length_function | ||
|
||
|
||
class LoaderConfig(BaseConfig): | ||
""" | ||
Config for the chunker used in `add` method | ||
""" | ||
|
||
def __init__(self): | ||
pass | ||
|
||
|
||
class AddConfig(BaseConfig): | ||
""" | ||
Config for the `add` method. | ||
""" | ||
def __init__(self): | ||
pass | ||
|
||
def __init__( | ||
self, | ||
chunker: Optional[ChunkerConfig] = None, | ||
loader: Optional[LoaderConfig] = None, | ||
): | ||
self.loader = loader | ||
self.chunker = chunker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ class BaseConfig: | |
""" | ||
Base config. | ||
""" | ||
|
||
def __init__(self): | ||
pass | ||
|
||
|
Oops, something went wrong.