llm00 0.3.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.
- llm00-0.3.0/LLM00/__init__.py +84 -0
- llm00-0.3.0/LLM00/test.py +13 -0
- llm00-0.3.0/PKG-INFO +116 -0
- llm00-0.3.0/README.md +103 -0
- llm00-0.3.0/llm00.egg-info/PKG-INFO +116 -0
- llm00-0.3.0/llm00.egg-info/SOURCES.txt +9 -0
- llm00-0.3.0/llm00.egg-info/dependency_links.txt +1 -0
- llm00-0.3.0/llm00.egg-info/requires.txt +4 -0
- llm00-0.3.0/llm00.egg-info/top_level.txt +1 -0
- llm00-0.3.0/setup.cfg +4 -0
- llm00-0.3.0/setup.py +29 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
|
|
2
|
+
# シンプルなLLMインターフェース [LLM00]
|
|
3
|
+
|
|
4
|
+
import os
|
|
5
|
+
import sys
|
|
6
|
+
import json
|
|
7
|
+
import fies
|
|
8
|
+
import time
|
|
9
|
+
import requests
|
|
10
|
+
from sout import sout
|
|
11
|
+
|
|
12
|
+
# OpenAIのAPIキー格納候補
|
|
13
|
+
api_keyfile_cand_ls = [
|
|
14
|
+
"./OpenAI_API_key_for_LLM00.txt",
|
|
15
|
+
"C:/develop/keys/OpenAI_API_key_for_LLM00.txt",
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
# OpenAIのAPIキー取得
|
|
19
|
+
def get_api_key():
|
|
20
|
+
for filepath in api_keyfile_cand_ls:
|
|
21
|
+
if os.path.exists(filepath):
|
|
22
|
+
return fies[filepath, "text"]
|
|
23
|
+
raise Exception("[LLM00 error] The API key file is missing (not found in any of the specified locations).")
|
|
24
|
+
|
|
25
|
+
# OpenAIのLLMを呼び出し
|
|
26
|
+
def call_openAI_api(query, model):
|
|
27
|
+
# ヘッダの指定
|
|
28
|
+
headers = {
|
|
29
|
+
"Authorization": "Bearer %s"%get_api_key(), # OpenAIのAPIキー取得
|
|
30
|
+
"Content-Type": "application/json",
|
|
31
|
+
}
|
|
32
|
+
# request bodyの指定
|
|
33
|
+
raw_body = {
|
|
34
|
+
"model": model,
|
|
35
|
+
"messages": [{"role": "user", "content": query}],
|
|
36
|
+
"reasoning_effort": "minimal", # thinkingの量 (選択肢: "minimal", "low", "medium", "high")
|
|
37
|
+
}
|
|
38
|
+
if "gpt-4" in model: del raw_body["reasoning_effort"] # 4oのためのアドホック処置
|
|
39
|
+
req_body = json.dumps(raw_body)
|
|
40
|
+
# 呼び出し
|
|
41
|
+
raw_resp = requests.post("https://api.openai.com/v1/chat/completions", data = req_body, headers = headers)
|
|
42
|
+
# レスポンスから必要部分を取り出して返す
|
|
43
|
+
resp = raw_resp.json()
|
|
44
|
+
# エラーの確認
|
|
45
|
+
if "choices" not in resp: raise Exception("[LLM00 error] An API error has occurred.")
|
|
46
|
+
# AIのレスポンステキストを取り出す
|
|
47
|
+
resp_text = resp["choices"][0]["message"]["content"]
|
|
48
|
+
return resp_text
|
|
49
|
+
|
|
50
|
+
# リトライ
|
|
51
|
+
def retry(
|
|
52
|
+
func, # 対象の処理
|
|
53
|
+
times = 3, # 試行回数
|
|
54
|
+
wait_sec = 3 # 待機時間
|
|
55
|
+
):
|
|
56
|
+
for _ in range(times):
|
|
57
|
+
try:
|
|
58
|
+
return func()
|
|
59
|
+
except:
|
|
60
|
+
print("[LLM00 error] There was an API error. Retrying...")
|
|
61
|
+
time.sleep(wait_sec)
|
|
62
|
+
raise Exception(f"[LLM00 error] The error persisted after {times} retry attempts.")
|
|
63
|
+
|
|
64
|
+
# ツールの中核をなすクラス
|
|
65
|
+
class LLM00_Class:
|
|
66
|
+
# 初期化処理
|
|
67
|
+
def __init__(self):
|
|
68
|
+
pass
|
|
69
|
+
# 簡易呼び出し
|
|
70
|
+
def __call__(self,
|
|
71
|
+
query, # AIへの問いかけ
|
|
72
|
+
model = "gpt-5", # モデル
|
|
73
|
+
):
|
|
74
|
+
# 型チェック
|
|
75
|
+
if type(query) != type(""): raise Exception("[LLM00 error] The query type is invalid. Only string types are allowed in the current version.")
|
|
76
|
+
# リトライ
|
|
77
|
+
resp = retry(
|
|
78
|
+
lambda : call_openAI_api(query, model), # OpenAIのLLMを呼び出し
|
|
79
|
+
times = 3, wait_sec = 3)
|
|
80
|
+
# AIからの返答を返す
|
|
81
|
+
return resp
|
|
82
|
+
|
|
83
|
+
# モジュールオブジェクトと「LLM00クラスのオブジェクト」を同一視
|
|
84
|
+
sys.modules[__name__] = LLM00_Class()
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
# シンプルなLLMインターフェース [LLM00]
|
|
3
|
+
# 【動作確認 / 使用例】
|
|
4
|
+
|
|
5
|
+
import sys
|
|
6
|
+
import ezpip
|
|
7
|
+
LLM00 = ezpip.load_develop("LLM00", "../", develop_flag = True)
|
|
8
|
+
|
|
9
|
+
# print(LLM00("ずばり簡潔に、タコの足は何本?")) # AIへの問いかけ [LLM00]
|
|
10
|
+
|
|
11
|
+
print(LLM00("ずばり簡潔に、タコの足は何本?", "gpt-5-mini")) # AIへの問いかけ [LLM00]
|
|
12
|
+
|
|
13
|
+
# print(LLM00("ずばり簡潔に、タコの足は何本?", "gpt-4o")) # AIへの問いかけ [LLM00]
|
llm00-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: llm00
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: An interface that allows you to use LLMs in an ultra-simple way
|
|
5
|
+
Home-page: https://github.co.jp/
|
|
6
|
+
Author: bib_inf
|
|
7
|
+
Author-email: contact.bibinf@gmail.com
|
|
8
|
+
License: CC0 v1.0
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
11
|
+
Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# LLM00
|
|
15
|
+
|
|
16
|
+
## Quick Start (忙しい人のためのLLM00)
|
|
17
|
+
```python
|
|
18
|
+
import LLM00
|
|
19
|
+
|
|
20
|
+
response = LLM00("What's the capital of France?")
|
|
21
|
+
print(response) # -> "The capital of France is Paris."
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 概要 (Overview)
|
|
25
|
+
LLM00は、最小限のコードでLLM(Large Language Model)を呼び出し、応答を得ることができる非常にシンプルなツールです。従来、LLMを使う際には複雑なコードや設定が必要なことが多く、開発者にとって手間がかかるものでした。LLM00は、そうした手間を取り除き、簡単かつ迅速にLLMを活用できる環境を提供します。「LLM00」という名前の「00」は、扱う労力がほとんどゼロに近いことを象徴しています。
|
|
26
|
+
|
|
27
|
+
LLM00を使うことで、実装にかかるストレスを大幅に軽減し、開発者のモチベーションや生産性を向上させることが期待できます。
|
|
28
|
+
|
|
29
|
+
LLM00 is a tool designed to make the use of Large Language Models (LLMs) remarkably simple with minimal code. Traditionally, working with LLMs involves complicated setups and code, which can be a burden on developers. LLM00 eliminates this hassle, allowing for quick and easy integration of LLMs. The "00" in the tool’s name signifies the minimal effort required to utilize it.
|
|
30
|
+
|
|
31
|
+
By using LLM00, developers can significantly reduce the stress of implementation, enhancing both motivation and productivity.
|
|
32
|
+
|
|
33
|
+
## 特徴 (Features)
|
|
34
|
+
- **極めてシンプルなインターフェース (Extremely Simple Interface):**
|
|
35
|
+
1行のコードでLLMを呼び出して応答を取得できます。コードの読みやすさや記述の短さを徹底的に追求しています。
|
|
36
|
+
|
|
37
|
+
- **呼び出しの簡易化 (Simplified Call Process):**
|
|
38
|
+
従来のLLM呼び出しは設定やAPIの詳細な記述が必要でしたが、LLM00はそれらを自動化し、ユーザーが最小限の操作でLLMを扱えるようにしています。
|
|
39
|
+
|
|
40
|
+
- **軽量かつ効率的 (Lightweight and Efficient):**
|
|
41
|
+
LLM00は、動作に必要な設定を削減し、軽量なインターフェースでスムーズな実行を可能にします。
|
|
42
|
+
|
|
43
|
+
- **今後の機能拡張予定 (Future Functionality):**
|
|
44
|
+
現在、APIキーのファイルパスを自由に指定する機能が開発中です。将来的には、より柔軟な設定が可能となる予定です。
|
|
45
|
+
|
|
46
|
+
### 英語版:
|
|
47
|
+
- **Extremely Simple Interface:**
|
|
48
|
+
With just one line of code, users can call an LLM and get a response. The tool is designed with a focus on ease of readability and conciseness in coding.
|
|
49
|
+
|
|
50
|
+
- **Simplified Call Process:**
|
|
51
|
+
Traditional LLM calls require extensive configuration and detailed API setup, but LLM00 automates much of that, allowing users to handle LLMs with minimal steps.
|
|
52
|
+
|
|
53
|
+
- **Lightweight and Efficient:**
|
|
54
|
+
LLM00 reduces the necessary configurations to the bare minimum, offering a smooth, lightweight interface for efficient execution.
|
|
55
|
+
|
|
56
|
+
- **Future Functionality:**
|
|
57
|
+
A feature to freely specify the file path for API keys is currently under development, promising more flexibility in future updates.
|
|
58
|
+
|
|
59
|
+
## インストール (Installation)
|
|
60
|
+
LLM00をインストールするには、以下のコマンドを実行します。
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install LLM00
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
To install LLM00, simply run the following command:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install LLM00
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 使い方 (Usage)
|
|
73
|
+
LLM00を使ったLLM呼び出しは非常に簡単です。以下のコード例を見てください。
|
|
74
|
+
|
|
75
|
+
### コード例 (Code Example)
|
|
76
|
+
```python
|
|
77
|
+
import LLM00
|
|
78
|
+
|
|
79
|
+
print(LLM00("ずばり簡潔に、タコの足は何本?")) # -> "8本です。"など、AIの返答が文字列で返る
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Calling an LLM using LLM00 is extremely straightforward. Here's an example:
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
import LLM00
|
|
86
|
+
|
|
87
|
+
print(LLM00("Simply put, how many legs does an octopus have?")) # -> "It has 8 legs." (or similar response)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
このコードでは、`LLM00`に簡単な質問を渡すだけで、LLMが自然言語で答えてくれます。APIキーや複雑な設定を意識する必要はありません。
|
|
91
|
+
|
|
92
|
+
APIキーを簡易的に設置したい場合は、カレントディレクトリに `OpenAI_API_key_for_LLM00.txt` を設置すると動作確認出来ます。
|
|
93
|
+
しかし、git等に誤ってコミットする危険があるので、永続的な運用方法としては非推奨です。
|
|
94
|
+
|
|
95
|
+
If you want a quick way to set up the API key, you can place a file named OpenAI_API_key_for_LLM00.txt in the current directory to verify that it works.
|
|
96
|
+
However, this method is not recommended for long-term use because there is a risk of accidentally committing the file to Git or other version control systems.
|
|
97
|
+
|
|
98
|
+
## 注意事項 (Notes)
|
|
99
|
+
- **APIキーの設定 (API Key Setup):**
|
|
100
|
+
現在のバージョンでは、APIキーのファイルパス指定は固定されています。柔軟にAPIキーを指定する機能は、将来的にリリース予定です。
|
|
101
|
+
|
|
102
|
+
- **API Key Setup:**
|
|
103
|
+
In the current version, the API key file path is fixed. The ability to specify a custom API key path is planned for future updates.
|
|
104
|
+
|
|
105
|
+
## 今後のアップデート予定 (Upcoming Updates)
|
|
106
|
+
- **APIキー管理機能の拡充:**
|
|
107
|
+
より自由度の高いAPIキー設定機能が開発中です。
|
|
108
|
+
|
|
109
|
+
- **設定オプションの追加:**
|
|
110
|
+
環境やユースケースに合わせてカスタマイズできる設定オプションの拡充が予定されています。
|
|
111
|
+
|
|
112
|
+
- **Expanded API Key Management:**
|
|
113
|
+
A more flexible system for setting API keys is currently under development.
|
|
114
|
+
|
|
115
|
+
- **Additional Configuration Options:**
|
|
116
|
+
Planned updates will introduce more customization options tailored to specific environments and use cases.
|
llm00-0.3.0/README.md
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# LLM00
|
|
2
|
+
|
|
3
|
+
## Quick Start (忙しい人のためのLLM00)
|
|
4
|
+
```python
|
|
5
|
+
import LLM00
|
|
6
|
+
|
|
7
|
+
response = LLM00("What's the capital of France?")
|
|
8
|
+
print(response) # -> "The capital of France is Paris."
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 概要 (Overview)
|
|
12
|
+
LLM00は、最小限のコードでLLM(Large Language Model)を呼び出し、応答を得ることができる非常にシンプルなツールです。従来、LLMを使う際には複雑なコードや設定が必要なことが多く、開発者にとって手間がかかるものでした。LLM00は、そうした手間を取り除き、簡単かつ迅速にLLMを活用できる環境を提供します。「LLM00」という名前の「00」は、扱う労力がほとんどゼロに近いことを象徴しています。
|
|
13
|
+
|
|
14
|
+
LLM00を使うことで、実装にかかるストレスを大幅に軽減し、開発者のモチベーションや生産性を向上させることが期待できます。
|
|
15
|
+
|
|
16
|
+
LLM00 is a tool designed to make the use of Large Language Models (LLMs) remarkably simple with minimal code. Traditionally, working with LLMs involves complicated setups and code, which can be a burden on developers. LLM00 eliminates this hassle, allowing for quick and easy integration of LLMs. The "00" in the tool’s name signifies the minimal effort required to utilize it.
|
|
17
|
+
|
|
18
|
+
By using LLM00, developers can significantly reduce the stress of implementation, enhancing both motivation and productivity.
|
|
19
|
+
|
|
20
|
+
## 特徴 (Features)
|
|
21
|
+
- **極めてシンプルなインターフェース (Extremely Simple Interface):**
|
|
22
|
+
1行のコードでLLMを呼び出して応答を取得できます。コードの読みやすさや記述の短さを徹底的に追求しています。
|
|
23
|
+
|
|
24
|
+
- **呼び出しの簡易化 (Simplified Call Process):**
|
|
25
|
+
従来のLLM呼び出しは設定やAPIの詳細な記述が必要でしたが、LLM00はそれらを自動化し、ユーザーが最小限の操作でLLMを扱えるようにしています。
|
|
26
|
+
|
|
27
|
+
- **軽量かつ効率的 (Lightweight and Efficient):**
|
|
28
|
+
LLM00は、動作に必要な設定を削減し、軽量なインターフェースでスムーズな実行を可能にします。
|
|
29
|
+
|
|
30
|
+
- **今後の機能拡張予定 (Future Functionality):**
|
|
31
|
+
現在、APIキーのファイルパスを自由に指定する機能が開発中です。将来的には、より柔軟な設定が可能となる予定です。
|
|
32
|
+
|
|
33
|
+
### 英語版:
|
|
34
|
+
- **Extremely Simple Interface:**
|
|
35
|
+
With just one line of code, users can call an LLM and get a response. The tool is designed with a focus on ease of readability and conciseness in coding.
|
|
36
|
+
|
|
37
|
+
- **Simplified Call Process:**
|
|
38
|
+
Traditional LLM calls require extensive configuration and detailed API setup, but LLM00 automates much of that, allowing users to handle LLMs with minimal steps.
|
|
39
|
+
|
|
40
|
+
- **Lightweight and Efficient:**
|
|
41
|
+
LLM00 reduces the necessary configurations to the bare minimum, offering a smooth, lightweight interface for efficient execution.
|
|
42
|
+
|
|
43
|
+
- **Future Functionality:**
|
|
44
|
+
A feature to freely specify the file path for API keys is currently under development, promising more flexibility in future updates.
|
|
45
|
+
|
|
46
|
+
## インストール (Installation)
|
|
47
|
+
LLM00をインストールするには、以下のコマンドを実行します。
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install LLM00
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
To install LLM00, simply run the following command:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pip install LLM00
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## 使い方 (Usage)
|
|
60
|
+
LLM00を使ったLLM呼び出しは非常に簡単です。以下のコード例を見てください。
|
|
61
|
+
|
|
62
|
+
### コード例 (Code Example)
|
|
63
|
+
```python
|
|
64
|
+
import LLM00
|
|
65
|
+
|
|
66
|
+
print(LLM00("ずばり簡潔に、タコの足は何本?")) # -> "8本です。"など、AIの返答が文字列で返る
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Calling an LLM using LLM00 is extremely straightforward. Here's an example:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
import LLM00
|
|
73
|
+
|
|
74
|
+
print(LLM00("Simply put, how many legs does an octopus have?")) # -> "It has 8 legs." (or similar response)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
このコードでは、`LLM00`に簡単な質問を渡すだけで、LLMが自然言語で答えてくれます。APIキーや複雑な設定を意識する必要はありません。
|
|
78
|
+
|
|
79
|
+
APIキーを簡易的に設置したい場合は、カレントディレクトリに `OpenAI_API_key_for_LLM00.txt` を設置すると動作確認出来ます。
|
|
80
|
+
しかし、git等に誤ってコミットする危険があるので、永続的な運用方法としては非推奨です。
|
|
81
|
+
|
|
82
|
+
If you want a quick way to set up the API key, you can place a file named OpenAI_API_key_for_LLM00.txt in the current directory to verify that it works.
|
|
83
|
+
However, this method is not recommended for long-term use because there is a risk of accidentally committing the file to Git or other version control systems.
|
|
84
|
+
|
|
85
|
+
## 注意事項 (Notes)
|
|
86
|
+
- **APIキーの設定 (API Key Setup):**
|
|
87
|
+
現在のバージョンでは、APIキーのファイルパス指定は固定されています。柔軟にAPIキーを指定する機能は、将来的にリリース予定です。
|
|
88
|
+
|
|
89
|
+
- **API Key Setup:**
|
|
90
|
+
In the current version, the API key file path is fixed. The ability to specify a custom API key path is planned for future updates.
|
|
91
|
+
|
|
92
|
+
## 今後のアップデート予定 (Upcoming Updates)
|
|
93
|
+
- **APIキー管理機能の拡充:**
|
|
94
|
+
より自由度の高いAPIキー設定機能が開発中です。
|
|
95
|
+
|
|
96
|
+
- **設定オプションの追加:**
|
|
97
|
+
環境やユースケースに合わせてカスタマイズできる設定オプションの拡充が予定されています。
|
|
98
|
+
|
|
99
|
+
- **Expanded API Key Management:**
|
|
100
|
+
A more flexible system for setting API keys is currently under development.
|
|
101
|
+
|
|
102
|
+
- **Additional Configuration Options:**
|
|
103
|
+
Planned updates will introduce more customization options tailored to specific environments and use cases.
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: llm00
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: An interface that allows you to use LLMs in an ultra-simple way
|
|
5
|
+
Home-page: https://github.co.jp/
|
|
6
|
+
Author: bib_inf
|
|
7
|
+
Author-email: contact.bibinf@gmail.com
|
|
8
|
+
License: CC0 v1.0
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
11
|
+
Classifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# LLM00
|
|
15
|
+
|
|
16
|
+
## Quick Start (忙しい人のためのLLM00)
|
|
17
|
+
```python
|
|
18
|
+
import LLM00
|
|
19
|
+
|
|
20
|
+
response = LLM00("What's the capital of France?")
|
|
21
|
+
print(response) # -> "The capital of France is Paris."
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## 概要 (Overview)
|
|
25
|
+
LLM00は、最小限のコードでLLM(Large Language Model)を呼び出し、応答を得ることができる非常にシンプルなツールです。従来、LLMを使う際には複雑なコードや設定が必要なことが多く、開発者にとって手間がかかるものでした。LLM00は、そうした手間を取り除き、簡単かつ迅速にLLMを活用できる環境を提供します。「LLM00」という名前の「00」は、扱う労力がほとんどゼロに近いことを象徴しています。
|
|
26
|
+
|
|
27
|
+
LLM00を使うことで、実装にかかるストレスを大幅に軽減し、開発者のモチベーションや生産性を向上させることが期待できます。
|
|
28
|
+
|
|
29
|
+
LLM00 is a tool designed to make the use of Large Language Models (LLMs) remarkably simple with minimal code. Traditionally, working with LLMs involves complicated setups and code, which can be a burden on developers. LLM00 eliminates this hassle, allowing for quick and easy integration of LLMs. The "00" in the tool’s name signifies the minimal effort required to utilize it.
|
|
30
|
+
|
|
31
|
+
By using LLM00, developers can significantly reduce the stress of implementation, enhancing both motivation and productivity.
|
|
32
|
+
|
|
33
|
+
## 特徴 (Features)
|
|
34
|
+
- **極めてシンプルなインターフェース (Extremely Simple Interface):**
|
|
35
|
+
1行のコードでLLMを呼び出して応答を取得できます。コードの読みやすさや記述の短さを徹底的に追求しています。
|
|
36
|
+
|
|
37
|
+
- **呼び出しの簡易化 (Simplified Call Process):**
|
|
38
|
+
従来のLLM呼び出しは設定やAPIの詳細な記述が必要でしたが、LLM00はそれらを自動化し、ユーザーが最小限の操作でLLMを扱えるようにしています。
|
|
39
|
+
|
|
40
|
+
- **軽量かつ効率的 (Lightweight and Efficient):**
|
|
41
|
+
LLM00は、動作に必要な設定を削減し、軽量なインターフェースでスムーズな実行を可能にします。
|
|
42
|
+
|
|
43
|
+
- **今後の機能拡張予定 (Future Functionality):**
|
|
44
|
+
現在、APIキーのファイルパスを自由に指定する機能が開発中です。将来的には、より柔軟な設定が可能となる予定です。
|
|
45
|
+
|
|
46
|
+
### 英語版:
|
|
47
|
+
- **Extremely Simple Interface:**
|
|
48
|
+
With just one line of code, users can call an LLM and get a response. The tool is designed with a focus on ease of readability and conciseness in coding.
|
|
49
|
+
|
|
50
|
+
- **Simplified Call Process:**
|
|
51
|
+
Traditional LLM calls require extensive configuration and detailed API setup, but LLM00 automates much of that, allowing users to handle LLMs with minimal steps.
|
|
52
|
+
|
|
53
|
+
- **Lightweight and Efficient:**
|
|
54
|
+
LLM00 reduces the necessary configurations to the bare minimum, offering a smooth, lightweight interface for efficient execution.
|
|
55
|
+
|
|
56
|
+
- **Future Functionality:**
|
|
57
|
+
A feature to freely specify the file path for API keys is currently under development, promising more flexibility in future updates.
|
|
58
|
+
|
|
59
|
+
## インストール (Installation)
|
|
60
|
+
LLM00をインストールするには、以下のコマンドを実行します。
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pip install LLM00
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
To install LLM00, simply run the following command:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install LLM00
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## 使い方 (Usage)
|
|
73
|
+
LLM00を使ったLLM呼び出しは非常に簡単です。以下のコード例を見てください。
|
|
74
|
+
|
|
75
|
+
### コード例 (Code Example)
|
|
76
|
+
```python
|
|
77
|
+
import LLM00
|
|
78
|
+
|
|
79
|
+
print(LLM00("ずばり簡潔に、タコの足は何本?")) # -> "8本です。"など、AIの返答が文字列で返る
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Calling an LLM using LLM00 is extremely straightforward. Here's an example:
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
import LLM00
|
|
86
|
+
|
|
87
|
+
print(LLM00("Simply put, how many legs does an octopus have?")) # -> "It has 8 legs." (or similar response)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
このコードでは、`LLM00`に簡単な質問を渡すだけで、LLMが自然言語で答えてくれます。APIキーや複雑な設定を意識する必要はありません。
|
|
91
|
+
|
|
92
|
+
APIキーを簡易的に設置したい場合は、カレントディレクトリに `OpenAI_API_key_for_LLM00.txt` を設置すると動作確認出来ます。
|
|
93
|
+
しかし、git等に誤ってコミットする危険があるので、永続的な運用方法としては非推奨です。
|
|
94
|
+
|
|
95
|
+
If you want a quick way to set up the API key, you can place a file named OpenAI_API_key_for_LLM00.txt in the current directory to verify that it works.
|
|
96
|
+
However, this method is not recommended for long-term use because there is a risk of accidentally committing the file to Git or other version control systems.
|
|
97
|
+
|
|
98
|
+
## 注意事項 (Notes)
|
|
99
|
+
- **APIキーの設定 (API Key Setup):**
|
|
100
|
+
現在のバージョンでは、APIキーのファイルパス指定は固定されています。柔軟にAPIキーを指定する機能は、将来的にリリース予定です。
|
|
101
|
+
|
|
102
|
+
- **API Key Setup:**
|
|
103
|
+
In the current version, the API key file path is fixed. The ability to specify a custom API key path is planned for future updates.
|
|
104
|
+
|
|
105
|
+
## 今後のアップデート予定 (Upcoming Updates)
|
|
106
|
+
- **APIキー管理機能の拡充:**
|
|
107
|
+
より自由度の高いAPIキー設定機能が開発中です。
|
|
108
|
+
|
|
109
|
+
- **設定オプションの追加:**
|
|
110
|
+
環境やユースケースに合わせてカスタマイズできる設定オプションの拡充が予定されています。
|
|
111
|
+
|
|
112
|
+
- **Expanded API Key Management:**
|
|
113
|
+
A more flexible system for setting API keys is currently under development.
|
|
114
|
+
|
|
115
|
+
- **Additional Configuration Options:**
|
|
116
|
+
Planned updates will introduce more customization options tailored to specific environments and use cases.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
LLM00
|
llm00-0.3.0/setup.cfg
ADDED
llm00-0.3.0/setup.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
from setuptools import setup
|
|
3
|
+
# 公開用パッケージの作成 [ezpip]
|
|
4
|
+
import ezpip
|
|
5
|
+
|
|
6
|
+
# 公開用パッケージの作成 [ezpip]
|
|
7
|
+
with ezpip.packager(develop_dir = "./_develop_LLM00/") as p:
|
|
8
|
+
setup(
|
|
9
|
+
name = "llm00",
|
|
10
|
+
version = "0.3.0",
|
|
11
|
+
description = 'An interface that allows you to use LLMs in an ultra-simple way',
|
|
12
|
+
author = "bib_inf",
|
|
13
|
+
author_email = "contact.bibinf@gmail.com",
|
|
14
|
+
url = "https://github.co.jp/",
|
|
15
|
+
packages = p.packages,
|
|
16
|
+
install_requires = ["ezpip", "sout>=1.2.1", "relpath", "fies>=1.4.0"],
|
|
17
|
+
long_description = p.long_description,
|
|
18
|
+
long_description_content_type = "text/markdown",
|
|
19
|
+
license = "CC0 v1.0",
|
|
20
|
+
classifiers = [
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"Topic :: Software Development :: Libraries",
|
|
23
|
+
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication"
|
|
24
|
+
],
|
|
25
|
+
# entry_points = """
|
|
26
|
+
# [console_scripts]
|
|
27
|
+
# py6 = py6:console_command
|
|
28
|
+
# """
|
|
29
|
+
)
|