updatte
Browse files
app/Http/controller/test_folders/test.html
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# 社員がプロフィールを登録・公開し、お互いに参照できるシステム
|
3 |
+
|
4 |
+
## 機能
|
5 |
+
|
6 |
+
## LINEのクレーム対応システムの作成
|
7 |
+
- クレームがあった用語をAPIでナレッジに登録するシステム
|
8 |
+
- APIキー agentキーをいれ
|
9 |
+
- 否定語に対する 文言に隊しての設定をする
|
10 |
+
|
11 |
+
### ユーザー登録
|
12 |
+
|
13 |
+
- ユーザー登録画面で、ユーザー名とパスワードを入力して登録ボタンを押すことにより、新規ユーザーを登録することができる。
|
14 |
+
- ユーザー名は、既存のユーザーと重複してはいけない。
|
15 |
+
- ユーザー登録に成功したら、ログイン済み状態として、ユーザー一覧画面へ遷移する。
|
16 |
+
|
17 |
+
### ログイン
|
18 |
+
|
19 |
+
- ログイン画面で、ユーザー名とパスワードを入力してログインボタンを押すことにより、ログインすることができる。
|
20 |
+
- ログインに成功したら、ユーザー一覧画面へ遷移する。
|
21 |
+
|
22 |
+
### チーム一覧・作成
|
23 |
+
|
24 |
+
- チームの一覧が、チームの作成日時降順で表示される。
|
25 |
+
- チーム名を入力して作成ボタンを押すと、チームが作成される。
|
26 |
+
- チームの作成後、本画面が再表示される。
|
27 |
+
|
28 |
+
### プロフィール編集
|
29 |
+
|
30 |
+
- 自身の`所属チーム`・`プロフィール`・`タグ`を編集できる。
|
31 |
+
- 所属チームは、既存チームからの選択式とする。
|
32 |
+
- プロフィールは自由入力とする。
|
33 |
+
- タグは自由入力で、複数入力できるようにする。
|
34 |
+
|
35 |
+
### ユーザー一覧・検索
|
36 |
+
|
37 |
+
- デフォルトでは全てのユーザーが一覧表示される。
|
38 |
+
- 検索条件を入力して検索ボタンを押すと、検索条件がプロフィールに部分一致するユーザーのみにフィルタリングできる。
|
39 |
+
- 一覧は、ユーザー登録日時の降順で表示される。
|
40 |
+
- 表示内容は、`ユーザー名`・`プロフィール`で、`プロフィール`は先頭10文字と三点リーダーを表示する。
|
41 |
+
- ユーザー名をクリックすると、そのユーザーのユーザー詳細画面へ遷移する。
|
42 |
+
- `チーム一覧へ`をクリックすると、チーム一覧画面へ遷移する。
|
43 |
+
|
44 |
+
### ユーザー詳細画面
|
45 |
+
|
46 |
+
- 特定のユーザーの、`ユーザー名`・`所属チーム`・`プロフィール`・`タグ`が表示される。
|
47 |
+
- プロフィールの表示はマークダウンに対応させる。
|
48 |
+
- `一覧へ`リンクをクリックすると、ユーザー一覧画面へ遷移する。
|
49 |
+
|
50 |
+
## あなたが作成するもの
|
51 |
+
|
52 |
+
バックエンドのプログラム一式を作成してください。
|
53 |
+
フロントエンドのプログラムは不要です。
|
54 |
+
|
55 |
+
- `/api`ディレクトリ以下に作成。
|
56 |
+
- Python/FastAPI/SQLAlchemyを使う。
|
57 |
+
- DBはSQLiteを使う。
|
58 |
+
- 必要に応じて外部ライブラリを使う。
|
59 |
+
- クラウドや外部サービス(外部API)は使わない。
|
60 |
+
- .gitignoreを含めること。
|
61 |
+
- バックエンド
|
62 |
+
@app.post("
|
63 |
+
def lumbda_function():
|
64 |
+
|
65 |
+
gradio_interface でメイン関数から読み込めるようにして
|
66 |
+
|
67 |
+
googleappsscript
|
68 |
+
ラインの画像検索システム
|
69 |
+
|
70 |
+
ファイルは1ファイルで作成して。
|
71 |
+
1ファイル1機能で難しくしたくない
|
72 |
+
|
73 |
+
1,lineからデータがくる
|
74 |
+
2,doPostで取得
|
75 |
+
3.typeがイメージの場合はドライブに保存
|
76 |
+
4,保存したデータをS3にアップロード
|
77 |
+
5.データはシークレットから取得
|
78 |
+
6,plantumlでフローの作成
|
79 |
+
7,システムドキュメントの作成
|
80 |
+
|
81 |
+
gradio は gradio_interface というBlock名で作成
|
82 |
+
fastapiはrouter の作成
|
83 |
+
|
app/Http/controller/test_folders/test.html.txt
ADDED
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
<!DOCTYPE html>
|
3 |
+
<html lang="ja">
|
4 |
+
<head>
|
5 |
+
<meta charset="UTF-8">
|
6 |
+
<title>LINEログイン</title>
|
7 |
+
|
8 |
+
<link rel="manifest" href="./psadc-manifest.json">
|
9 |
+
</head>
|
10 |
+
<body>
|
11 |
+
<h1>LINEログイン</h1>
|
12 |
+
<button id="login-btn">LINEでログイン</button>
|
13 |
+
|
14 |
+
<script>
|
15 |
+
document.getElementById("login-btn").addEventListener("click", function () {
|
16 |
+
const clientId = "1653447401"; // ←あなたのLINEチャネルIDに差し替え
|
17 |
+
const redirectUri = encodeURIComponent("https://kinkaimasu.jp/mypage/login/line/callback/");
|
18 |
+
const state = crypto.randomUUID(); // CSRF対策
|
19 |
+
const scope = "profile openid email";
|
20 |
+
|
21 |
+
sessionStorage.setItem("line_login_state", state); // 後で検証用に保存
|
22 |
+
|
23 |
+
const url = `https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}&state=${state}&scope=${scope}&prompt=consent&max_age=600&ui_locales=ja`;
|
24 |
+
|
25 |
+
window.location.href = url;
|
26 |
+
});
|
27 |
+
</script>
|
28 |
+
<svg style="z-index:9997;position:fixed;bottom:0;right:0" viewBox="0 0 315 27" width="315" height="27">
|
29 |
+
<path d="M143.905 0.043004L85.585 0.105C75.385 0.0870005 66.415 1.866 58.655 5.535C50.765 9.265 42.855 12.989 34.975 16.73C27.165 20.443 26.057 22.638 15.778 22.501C5.775 22.368 2.44 26.781 0 26.781L0.545006 26.693C22.005 26.672 43.455 26.676 64.915 26.676C90.655 26.676 116.395 26.665 142.135 26.699C143.115 26.699 143.915 26.259 143.915 25.707C143.855 11.729 143.855 14.026 143.915 0.0490007L143.905 0.043004Z" fill="#292929"></path>
|
30 |
+
<path d="M140.258 0L315 0.340524L314.966 27L140 26.9616L140.258 0Z" fill="#292929"></path>
|
31 |
+
</svg>
|
32 |
+
<div style="z-index:9998;font-family:sans-serif;background-color:#292929;padding:2px 8px;position:fixed;bottom:0;right:0;left:0"></div>
|
33 |
+
<div style="z-index:9999;color:white;font-size: 0.7rem;font-family:sans-serif;padding: 5px;position:fixed;bottom:0;right:0">
|
34 |
+
<a href="https://pyscript.com/@miyataken999999" id="made-on" target="_blank" style="color:#FFF;text-decoration:none;">Made on pyscript.com</a> │ <a href="https://pyscript.com/@miyataken999999/api-proxy-tutorial-copy/latest" id="view-code" target="_blank" style="color:#FFF;text-decoration:none;">View Code</a><span id="install-pwa-section" hidden> │ <a id="install-pwa" style="cursor:pointer; color:#FFF;">Install</a></span>  
|
35 |
+
</div>
|
36 |
+
|
37 |
+
<script>
|
38 |
+
let installPrompt = null;
|
39 |
+
const installSection = document.querySelector("#install-pwa-section")
|
40 |
+
const installButton = document.querySelector("#install-pwa");
|
41 |
+
|
42 |
+
window.addEventListener("beforeinstallprompt", (event) => {
|
43 |
+
if ("onappinstalled" in window) {
|
44 |
+
installSection.removeAttribute("hidden")
|
45 |
+
}
|
46 |
+
event.preventDefault();
|
47 |
+
installPrompt = event;
|
48 |
+
});
|
49 |
+
|
50 |
+
installButton.addEventListener("click", async () => {
|
51 |
+
if (!installPrompt) {
|
52 |
+
return;
|
53 |
+
}
|
54 |
+
const result = await installPrompt.prompt();
|
55 |
+
disableInAppInstallPrompt();
|
56 |
+
});
|
57 |
+
|
58 |
+
function disableInAppInstallPrompt() {
|
59 |
+
installPrompt = null;
|
60 |
+
installButton.setAttribute("hidden", "");
|
61 |
+
};
|
62 |
+
</script>
|
63 |
+
|
64 |
+
<script>
|
65 |
+
const heap_app_id = "758475466";
|
66 |
+
// Only add analytics if we got an id
|
67 |
+
if (heap_app_id) {
|
68 |
+
// Analytics code
|
69 |
+
window.heap=window.heap||[],heap.load=function(e,t){window.heap.appid=e,window.heap.config=t=t||{};var r=document.createElement("script");r.type="text/javascript",r.async=!0,r.src="https://cdn.heapanalytics.com/js/heap-"+e+".js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(r,a);for(var n=function(e){return function(){heap.push([e].concat(Array.prototype.slice.call(arguments,0)))}},p=["addEventProperties","addUserProperties","clearEventProperties","identify","resetIdentity","removeEventProperty","setEventProperties","track","unsetEventProperty"],o=0;o<p.length;o++)heap[p[o]]=n(p[o])};
|
70 |
+
heap.load(heap_app_id);
|
71 |
+
|
72 |
+
// Add event listener to the made-on link
|
73 |
+
document.querySelector("#made-on").addEventListener("click", () => {
|
74 |
+
heap.track("PSADC - Make on Pyscript");
|
75 |
+
});
|
76 |
+
// Add event listener to the view-code link
|
77 |
+
document.querySelector("#view-code").addEventListener("click", () => {
|
78 |
+
heap.track("PSADC - View Code");
|
79 |
+
});
|
80 |
+
// Add event listener to the install-pwa link
|
81 |
+
document.querySelector("#install-pwa").addEventListener("click", () => {
|
82 |
+
heap.track("PSADC - Install PWA");
|
83 |
+
});
|
84 |
+
}
|
85 |
+
</script></body>
|
86 |
+
</html>
|
app/Http/controller/test_folderss
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit 31ba048e1b1cded62732338ab241cc4dbb24e8fe
|
chat_history.db
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7c3e7ff09eeb022ff1e0a03d12cedc4fce9cc0092719fd52fc526347bd9e4f2f
|
3 |
+
size 1871872
|
controllers/gra_03_programfromdoc/programfromdoc.py
CHANGED
@@ -97,7 +97,7 @@ fastapiはrouter の作成
|
|
97 |
"""
|
98 |
|
99 |
def send_to_google_chat(message: str):
|
100 |
-
webhook_url = 'https://chat.googleapis.com/v1/spaces/
|
101 |
headers = {'Content-Type': 'application/json; charset=UTF-8'}
|
102 |
data = {'text': message}
|
103 |
response = requests.post(webhook_url, headers=headers, json=data)
|
|
|
97 |
"""
|
98 |
|
99 |
def send_to_google_chat(message: str):
|
100 |
+
webhook_url = 'https://chat.googleapis.com/v1/spaces/AAAANwDF_KE/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=qSigSPSbTINJITgO30iGKnyeY48emcUJd9LST7FBLLY'
|
101 |
headers = {'Content-Type': 'application/json; charset=UTF-8'}
|
102 |
data = {'text': message}
|
103 |
response = requests.post(webhook_url, headers=headers, json=data)
|