mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-29 01:31:41 +00:00
feat: devex help, add Makefile, ruff, pre-commit, and modernize CI
This commit is contained in:
parent
172a38c344
commit
f4d7e6a29e
111 changed files with 11655 additions and 10200 deletions
|
|
@ -12,8 +12,6 @@ import json
|
|||
import os
|
||||
import time
|
||||
from pathlib import Path
|
||||
from typing import Optional
|
||||
|
||||
|
||||
CACHE_PATH = Path(os.path.expanduser("~/.hermes/sticker_cache.json"))
|
||||
|
||||
|
|
@ -43,7 +41,7 @@ def _save_cache(cache: dict) -> None:
|
|||
)
|
||||
|
||||
|
||||
def get_cached_description(file_unique_id: str) -> Optional[dict]:
|
||||
def get_cached_description(file_unique_id: str) -> dict | None:
|
||||
"""
|
||||
Look up a cached sticker description.
|
||||
|
||||
|
|
@ -92,11 +90,11 @@ def build_sticker_injection(
|
|||
"""
|
||||
context = ""
|
||||
if set_name and emoji:
|
||||
context = f" {emoji} from \"{set_name}\""
|
||||
context = f' {emoji} from "{set_name}"'
|
||||
elif emoji:
|
||||
context = f" {emoji}"
|
||||
|
||||
return f"[The user sent a sticker{context}~ It shows: \"{description}\" (=^.w.^=)]"
|
||||
return f'[The user sent a sticker{context}~ It shows: "{description}" (=^.w.^=)]'
|
||||
|
||||
|
||||
def build_animated_sticker_injection(emoji: str = "") -> str:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue