askai-python 0.1.3__tar.gz → 0.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {askai_python-0.1.3/askai_python.egg-info → askai_python-0.1.6}/PKG-INFO +2 -1
- askai_python-0.1.6/ask_ai/__init__.py +26 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/base.py +2 -1
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/providers/azure_provider.py +4 -5
- {askai_python-0.1.3 → askai_python-0.1.6/askai_python.egg-info}/PKG-INFO +2 -1
- {askai_python-0.1.3 → askai_python-0.1.6}/askai_python.egg-info/SOURCES.txt +1 -1
- {askai_python-0.1.3 → askai_python-0.1.6}/askai_python.egg-info/requires.txt +1 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/pyproject.toml +4 -3
- {askai_python-0.1.3 → askai_python-0.1.6}/tests/test_core.py +0 -2
- askai_python-0.1.3/ask_ai/__init__.py +0 -7
- {askai_python-0.1.3 → askai_python-0.1.6}/LICENSE +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/README.md +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/__main__.py +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/cli.py +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/config.py +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/exceptions.py +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/media.py +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/providers/__init__.py +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/providers/anthropic_provider.py +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/providers/google_provider.py +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/providers/groq_provider.py +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/providers/openai_provider.py +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/ask_ai/providers/openrouter_provider.py +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/askai_python.egg-info/dependency_links.txt +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/askai_python.egg-info/top_level.txt +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6/docs}/PYPI_README.md +0 -0
- {askai_python-0.1.3 → askai_python-0.1.6}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: askai-python
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: AI Made Stupid Simple. Unified API for OpenAI, Groq, Google, and more.
|
|
5
5
|
Author-email: Hossein Ghorbani <hosseingh1068@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -14,6 +14,7 @@ Requires-Dist: groq
|
|
|
14
14
|
Requires-Dist: google-generativeai
|
|
15
15
|
Requires-Dist: anthropic
|
|
16
16
|
Requires-Dist: requests
|
|
17
|
+
Requires-Dist: Pillow
|
|
17
18
|
Dynamic: license-file
|
|
18
19
|
|
|
19
20
|
# askai-python 🚀
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from .providers import (
|
|
2
|
+
OpenAI,
|
|
3
|
+
Anthropic,
|
|
4
|
+
Google,
|
|
5
|
+
Groq,
|
|
6
|
+
Azure,
|
|
7
|
+
OpenRouter
|
|
8
|
+
)
|
|
9
|
+
from .config import AdvancedConfig
|
|
10
|
+
from .base import Response
|
|
11
|
+
from .media import ImageObject, AudioObject
|
|
12
|
+
from .exceptions import AskAIError
|
|
13
|
+
|
|
14
|
+
__all__ = [
|
|
15
|
+
"OpenAI",
|
|
16
|
+
"Anthropic",
|
|
17
|
+
"Google",
|
|
18
|
+
"Groq",
|
|
19
|
+
"Azure",
|
|
20
|
+
"OpenRouter",
|
|
21
|
+
"AdvancedConfig",
|
|
22
|
+
"Response",
|
|
23
|
+
"ImageObject",
|
|
24
|
+
"AudioObject",
|
|
25
|
+
"AskAIError"
|
|
26
|
+
]
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
from
|
|
2
|
-
import os
|
|
3
|
-
from ..base import BaseProvider, Response # Import base classes
|
|
1
|
+
from ..base import BaseProvider, Response
|
|
4
2
|
from ..config import AdvancedConfig
|
|
5
3
|
from ..exceptions import APIKeyError, ProviderError
|
|
6
4
|
from .openai_provider import OpenAIProvider
|
|
7
5
|
|
|
8
6
|
class AzureProvider(OpenAIProvider):
|
|
9
|
-
def __init__(self, api_key: str = None, model: str = None, endpoint: str = None,
|
|
7
|
+
def __init__(self, api_key: str = None, model: str = None, endpoint: str = None,
|
|
8
|
+
api_version: str = None, deployment_name: str = None, **kwargs):
|
|
10
9
|
|
|
11
10
|
self.api_key = api_key or os.environ.get("AZURE_OPENAI_API_KEY")
|
|
12
11
|
if not self.api_key:
|
|
@@ -26,7 +25,7 @@ class AzureProvider(OpenAIProvider):
|
|
|
26
25
|
azure_endpoint=self.endpoint
|
|
27
26
|
)
|
|
28
27
|
|
|
29
|
-
self.model = model or os.environ.get("AZURE_OPENAI_DEPLOYMENT_NAME")
|
|
28
|
+
self.model = model or deployment_name or os.environ.get("AZURE_OPENAI_DEPLOYMENT_NAME")
|
|
30
29
|
if not self.model:
|
|
31
30
|
# Azure uses "deployment name" as model parameter usually.
|
|
32
31
|
raise ProviderError("Azure Model (Deployment Name) is missing. Set AZURE_OPENAI_DEPLOYMENT_NAME env var or pass model=")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: askai-python
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6
|
|
4
4
|
Summary: AI Made Stupid Simple. Unified API for OpenAI, Groq, Google, and more.
|
|
5
5
|
Author-email: Hossein Ghorbani <hosseingh1068@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -14,6 +14,7 @@ Requires-Dist: groq
|
|
|
14
14
|
Requires-Dist: google-generativeai
|
|
15
15
|
Requires-Dist: anthropic
|
|
16
16
|
Requires-Dist: requests
|
|
17
|
+
Requires-Dist: Pillow
|
|
17
18
|
Dynamic: license-file
|
|
18
19
|
|
|
19
20
|
# askai-python 🚀
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
LICENSE
|
|
2
|
-
PYPI_README.md
|
|
3
2
|
README.md
|
|
4
3
|
pyproject.toml
|
|
5
4
|
ask_ai/__init__.py
|
|
@@ -21,4 +20,5 @@ askai_python.egg-info/SOURCES.txt
|
|
|
21
20
|
askai_python.egg-info/dependency_links.txt
|
|
22
21
|
askai_python.egg-info/requires.txt
|
|
23
22
|
askai_python.egg-info/top_level.txt
|
|
23
|
+
docs/PYPI_README.md
|
|
24
24
|
tests/test_core.py
|
|
@@ -4,9 +4,9 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "askai-python"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.6"
|
|
8
8
|
description = "AI Made Stupid Simple. Unified API for OpenAI, Groq, Google, and more."
|
|
9
|
-
readme = "PYPI_README.md"
|
|
9
|
+
readme = "docs/PYPI_README.md"
|
|
10
10
|
requires-python = ">=3.8"
|
|
11
11
|
license = {text = "MIT"}
|
|
12
12
|
authors = [
|
|
@@ -17,7 +17,8 @@ dependencies = [
|
|
|
17
17
|
"groq",
|
|
18
18
|
"google-generativeai",
|
|
19
19
|
"anthropic",
|
|
20
|
-
"requests"
|
|
20
|
+
"requests",
|
|
21
|
+
"Pillow"
|
|
21
22
|
]
|
|
22
23
|
|
|
23
24
|
[project.urls]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|