numpu 0.1.0__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.
- numpu-0.1.0/PKG-INFO +13 -0
- numpu-0.1.0/numpu/__init__.py +1 -0
- numpu-0.1.0/numpu/numpu.py +20 -0
- numpu-0.1.0/numpu.egg-info/PKG-INFO +13 -0
- numpu-0.1.0/numpu.egg-info/SOURCES.txt +8 -0
- numpu-0.1.0/numpu.egg-info/dependency_links.txt +1 -0
- numpu-0.1.0/numpu.egg-info/requires.txt +1 -0
- numpu-0.1.0/numpu.egg-info/top_level.txt +1 -0
- numpu-0.1.0/setup.cfg +4 -0
- numpu-0.1.0/setup.py +14 -0
numpu-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .numpu import np
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
from g4f.client import Client
|
|
2
|
+
|
|
3
|
+
# initialize the client once
|
|
4
|
+
_client = Client()
|
|
5
|
+
|
|
6
|
+
def np(prompt: str, model: str = "gpt-4o-mini", web_search: bool = False) -> None:
|
|
7
|
+
"""
|
|
8
|
+
Send a prompt to the chat client and print the response.
|
|
9
|
+
|
|
10
|
+
Args:
|
|
11
|
+
prompt (str): The user prompt to send.
|
|
12
|
+
model (str): Model name (default: 'gpt-4o-mini').
|
|
13
|
+
web_search (bool): Whether to enable web search (default: False).
|
|
14
|
+
"""
|
|
15
|
+
response = _client.chat.completions.create(
|
|
16
|
+
model=model,
|
|
17
|
+
messages=[{"role": "user", "content": prompt}],
|
|
18
|
+
web_search=web_search
|
|
19
|
+
)
|
|
20
|
+
print(response.choices[0].message.content)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
g4f>=0.1.0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
numpu
|
numpu-0.1.0/setup.cfg
ADDED
numpu-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
setup(
|
|
4
|
+
name='numpu', # the package name
|
|
5
|
+
version='0.1.0',
|
|
6
|
+
description='Simple wrapper for g4f chat client',
|
|
7
|
+
author='sidh2690',
|
|
8
|
+
author_email='you@example.com',
|
|
9
|
+
packages=find_packages(),
|
|
10
|
+
install_requires=[
|
|
11
|
+
'g4f>=0.1.0',
|
|
12
|
+
],
|
|
13
|
+
python_requires='>=3.7',
|
|
14
|
+
)
|