Skip to content

Commit

Permalink
测试例程更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Ikaros-521 committed Feb 28, 2024
1 parent c3d1103 commit 4a485cb
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions tests/test_zhipu/app_api.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,3 @@
# import time
# import jwt

# def generate_token(apikey: str, exp_seconds: int):
# try:
# id, secret = apikey.split(".")
# except Exception as e:
# raise Exception("invalid apikey", e)

# payload = {
# "api_key": id,
# "exp": int(round(time.time() * 1000)) + exp_seconds * 1000,
# "timestamp": int(round(time.time() * 1000)),
# }

# tmp = jwt.JWT()

# return tmp.encode(
# payload,
# secret,
# alg="HS256",
# optional_headers={"alg": "HS256", "sign_type": "SIGN"},
# )

# print(generate_token("25571a2d0af8583121c3248be7e89d29.AuIX3O5ktKuQVMtC", 30 * 24 * 3600))

import time
import jwt # 确保这是 PyJWT 库
import requests
Expand Down

0 comments on commit 4a485cb

Please sign in to comment.