Skip to content

Commit 6321c8d

Browse files
committed
fix conflicts and merge with master
2 parents cf52fcf + 398dd74 commit 6321c8d

File tree

483 files changed

+37663
-12051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

483 files changed

+37663
-12051
lines changed

.circleci/config.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,19 @@ jobs:
2121
# Copy settings file
2222
aws s3 cp $S3PATH edenai_apis/api_keys --recursive
2323
24+
25+
- run:
26+
name: Install Poetry
27+
command: |
28+
curl -sSL https://install.python-poetry.org | python3 -
29+
echo "$HOME/.local/bin" >> $GITHUB_PATH # Ensure Poetry is in PATH
30+
2431
- run:
2532
name: Install dependencies
2633
command: |
2734
sudo apt-get update
2835
sudo apt-get install ffmpeg -y
29-
pip install -r requirements.txt
36+
poetry install --no-interaction --no-root
3037
3138
- run:
3239
name: Test
@@ -64,12 +71,19 @@ jobs:
6471
pip install awscli --upgrade
6572
# Copy settings file
6673
aws s3 cp $S3PATH edenai_apis/api_keys --recursive
74+
75+
- run:
76+
name: Install Poetry
77+
command: |
78+
curl -sSL https://install.python-poetry.org | python3 -
79+
echo "$HOME/.local/bin" >> $GITHUB_PATH # Ensure Poetry is in PATH
80+
6781
- run:
6882
name: Install dependencies
6983
command: |
7084
sudo apt-get update
7185
sudo apt-get install ffmpeg -y
72-
pip install -e .
86+
poetry install --no-interaction --no-root
7387
7488
- run:
7589
name: check working providers
@@ -100,4 +114,4 @@ workflows:
100114
- master
101115
- release
102116
jobs:
103-
- check_providers
117+
- check_providers

.docsrc/conf.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,29 @@
77
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
88
import os
99
import sys
10-
sys.path.insert(0, os.path.abspath('../'))
1110

12-
project = 'edenai-apis'
13-
copyright = '2022, Eden AI'
14-
author = 'Eden AI'
11+
sys.path.insert(0, os.path.abspath("../"))
12+
13+
project = "edenai-apis"
14+
copyright = "2022, Eden AI"
15+
author = "Eden AI"
1516

1617
# -- General configuration ---------------------------------------------------
1718
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
1819

19-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.napoleon']
20-
templates_path = ['_templates']
21-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
20+
extensions = ["sphinx.ext.autodoc", "sphinx.ext.autosummary", "sphinx.ext.napoleon"]
21+
templates_path = ["_templates"]
22+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
2223

2324
autosummary_generate = True
2425
autodoc_default_options = {
25-
'members': True,
26+
"members": True,
2627
}
2728
napoleon_google_docstring = True
2829
napoleon_include_private_with_doc = True
2930

3031
# -- Options for HTML output -------------------------------------------------
3132
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
3233

33-
html_theme = 'furo'
34-
html_static_path = ['_static']
34+
html_theme = "furo"
35+
html_static_path = ["_static"]

.github/workflows/test.yml

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,44 +25,70 @@ jobs:
2525
- name: Setup Python
2626
uses: actions/setup-python@v4
2727
with:
28-
python-version: "3.11"
28+
python-version: "3.12"
29+
30+
- name: Install Poetry
31+
run: |
32+
curl -sSL https://install.python-poetry.org | python3 -
33+
echo "$HOME/.local/bin" >> $GITHUB_PATH # Ensure Poetry is in PATH
34+
35+
36+
- name: Debug
37+
run: |
38+
git diff HEAD pyproject.toml
39+
40+
- name: Clear Poetry cache
41+
run: poetry cache clear pypi --all
2942

3043
- name: Install dependencies
3144
run: |
3245
sudo apt-get update
3346
sudo apt-get install ffmpeg -y
34-
pip install -r requirements.txt -c constraints.txt
47+
poetry install --no-interaction --no-root # Installs dependencies from `poetry.lock`
48+
3549
- name: Set Env variables
3650
run: "echo TEST_SCOPE=CICD-OPENSOURCE >> $GITHUB_ENV"
51+
3752
- name: Run Test suite
3853
run: |
39-
pytest -vvv -s -n auto --maxprocesses=8 --dist loadgroup
40-
- name: generate list of providers and features markdown
54+
pytest -vvv -s -m 'unit or integration' -n auto --maxprocesses=8 --dist loadgroup
55+
56+
generate_doc:
57+
needs: test
58+
runs-on: ubuntu-latest
59+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
60+
61+
steps:
62+
- name: Check out repository code
63+
uses: actions/checkout@v3
64+
65+
- name: Generate list of providers and features markdown
4166
run: "python -m edenai_apis.scripts.documentation"
42-
- name: generate doc
67+
68+
- name: Generate doc
4369
run: |
4470
cd .docsrc
4571
rm -rf _build/**
4672
rm -rf _autosummary/*
4773
sphinx-apidoc -o _build/ ../edenai_apis/
4874
make html
4975
cp -r _build/html/* ../docs/
50-
- name: commit documentation changes
76+
77+
- name: Commit documentation changes
5178
uses: EndBug/add-and-commit@v9
5279
with:
5380
add: AVAILABLES_FEATURES_AND_PROVIDERS.md
5481
committer_name: Github Action
5582
committer_email: [email protected]
5683
message: '[doc] update available features & providers'
5784

58-
5985
generate_doc_and_deploy:
60-
needs: test
86+
needs: generate_doc
6187
environment:
6288
name: github-pages
6389
url: ${{ steps.deployment.outputs.page_url }}
6490
runs-on: ubuntu-latest
65-
if: github.ref == 'refs/heads/master'
91+
6692
steps:
6793
- name: Checkout
6894
uses: actions/checkout@v3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ media
2727
pyrightconfig.json
2828

2929
*.env*
30+
.pre-commit-config.yaml

MANIFEST.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
include edenai_apis/apis/*/outputs/*/*.json
22
include edenai_apis/apis/*/info.json
33
include edenai_apis/features/*/data/*
4+
include edenai_apis/features/audio/*/*.json
5+
include edenai_apis/features/image/*/*.json
6+
include edenai_apis/features/multimodal/*/*.json
7+
include edenai_apis/features/text/*/*.json
8+
include edenai_apis/features/ocr/*/*.json
9+
include edenai_apis/features/translation/*/*.json
10+
include edenai_apis/features/video/*/*.json
411
include edenai_apis/features/ocr/identity_parser/countries.json
12+
include edenai_apis/llmengine/clients/llm_models/models.json
513
recursive-include edenai_apis/utils *

edenai_apis/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717
To see all available providers and features,
1818
check the Full documentation at <https://edenai.github.io/edenai_apis>.
1919
"""
20+
2021
from . import apis
2122
from . import features
2223
from . import interface
2324
from . import loaders
2425
from . import settings
2526
from . import utils
26-
from .interface_v2 import Text, Ocr, Video, Audio, Image, Translation, Multimodal
27+
from .interface_v2 import Text, Ocr, Video, Audio, Image, Translation, Multimodal, Llm
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"api_key": ""
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"api_key": ""
3+
}

edenai_apis/api_keys/microsoft_settings_template.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,9 @@
5454
"training_key": "",
5555
"prediction_key": "",
5656
"resource_id": ""
57+
},
58+
"generative": {
59+
"url": "",
60+
"key": ""
5761
}
5862
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"api_key": ""
3+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"api_key": ""
3+
}

edenai_apis/apis/__init__.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .astria import AstriaApi
99
from .base64 import Base64Api
1010
from .clarifai import ClarifaiApi
11+
from .clipdrop import ClipdropApi
1112
from .cohere import CohereApi
1213
from .corticalio import CorticalioApi
1314
from .dataleon import DataleonApi
@@ -23,7 +24,10 @@
2324
from .gladia import GladiaApi
2425
from .google import GoogleApi
2526
from .hireability import HireabilityApi
27+
from .ibm import IbmApi
28+
from .jina import JinaApi
2629
from .klippa import KlippaApi
30+
from .leonardo import LeonardoApi
2731
from .lovoai import LovoaiApi
2832
from .meaningcloud import MeaningcloudApi
2933
from .meta import MetaApi
@@ -52,16 +56,17 @@
5256
from .symbl import SymblApi
5357
from .tabscanner import TabscannerApi
5458
from .tenstorrent import TenstorrentApi
59+
from .twelvelabs import TwelveLabsApi
5560
from .vernai import VernaiApi
5661
from .veryfi import VeryfiApi
5762
from .voci import VociApi
5863
from .voxist import VoxistApi
5964
from .winstonai import WinstonaiApi
6065
from .writesonic import WritesonicApi
61-
from .jina import JinaApi
62-
from .twelvelabs import TwelveLabsApi
63-
from .clipdrop import ClipdropApi
64-
from .leonardo import LeonardoApi
66+
from .xai import XAiApi
67+
from .deepseek import DeepseekApi
68+
from .together_ai import TogetheraiApi
69+
from .groq import GroqApi
6570
from .picsart import PicsartApi
6671

6772
# THIS NEEDS TO BE DONE AUTOMATICALLY

edenai_apis/apis/affinda/affinda_api.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def __init__(self, api_keys: Dict = {}):
3939
self.client.current_organization = self.client.get_organizations()[0].identifier
4040

4141
def ocr__resume_parser(
42-
self, file: str, file_url: str = "", model: str = None
42+
self, file: str, file_url: str = "", model: str = None, **kwargs
4343
) -> ResponseType[ResumeParserDataClass]:
4444
self.client.current_workspace = self.api_settings["nextgen_resume_parser"]
4545

@@ -63,7 +63,7 @@ def ocr__resume_parser(
6363
)
6464

6565
def ocr__invoice_parser(
66-
self, file: str, language: str, file_url: str = ""
66+
self, file: str, language: str, file_url: str = "", **kwargs
6767
) -> ResponseType[InvoiceParserDataClass]:
6868
self.client.current_workspace = self.api_settings["invoice_workspace"]
6969

@@ -87,7 +87,7 @@ def ocr__invoice_parser(
8787
)
8888

8989
def ocr__receipt_parser(
90-
self, file: str, language: str, file_url: str = ""
90+
self, file: str, language: str, file_url: str = "", **kwargs
9191
) -> ResponseType[ReceiptParserDataClass]:
9292
self.client.current_workspace = self.api_settings["receipt_workspace"]
9393
document = self.client.create_document(
@@ -110,7 +110,7 @@ def ocr__receipt_parser(
110110
)
111111

112112
def ocr__identity_parser(
113-
self, file: str, file_url: str = "", model: str = None
113+
self, file: str, file_url: str = "", model: str = None, **kwargs
114114
) -> ResponseType[IdentityParserDataClass]:
115115
self.client.current_workspace = self.api_settings["identity_workspace"]
116116
document = self.client.create_document(
@@ -135,6 +135,7 @@ def ocr__financial_parser(
135135
document_type: str = "",
136136
file_url: str = "",
137137
model: str = None,
138+
**kwargs,
138139
) -> ResponseType[FinancialParserDataClass]:
139140
workspace_key = (
140141
"receipt_workspace"

0 commit comments

Comments
 (0)