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 ADDED
@@ -0,0 +1,13 @@
1
+ Metadata-Version: 2.1
2
+ Name: numpu
3
+ Version: 0.1.0
4
+ Summary: Simple wrapper for g4f chat client
5
+ Home-page: UNKNOWN
6
+ Author: sidh2690
7
+ Author-email: you@example.com
8
+ License: UNKNOWN
9
+ Platform: UNKNOWN
10
+ Requires-Python: >=3.7
11
+
12
+ UNKNOWN
13
+
@@ -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,13 @@
1
+ Metadata-Version: 2.1
2
+ Name: numpu
3
+ Version: 0.1.0
4
+ Summary: Simple wrapper for g4f chat client
5
+ Home-page: UNKNOWN
6
+ Author: sidh2690
7
+ Author-email: you@example.com
8
+ License: UNKNOWN
9
+ Platform: UNKNOWN
10
+ Requires-Python: >=3.7
11
+
12
+ UNKNOWN
13
+
@@ -0,0 +1,8 @@
1
+ setup.py
2
+ numpu/__init__.py
3
+ numpu/numpu.py
4
+ numpu.egg-info/PKG-INFO
5
+ numpu.egg-info/SOURCES.txt
6
+ numpu.egg-info/dependency_links.txt
7
+ numpu.egg-info/requires.txt
8
+ numpu.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ g4f>=0.1.0
@@ -0,0 +1 @@
1
+ numpu
numpu-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
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
+ )