MCPcopy
hub / github.com/datascale-ai/opentalking / decode

Method decode

opentalking/agent/knowledge_index.py:38–47  ·  view source on GitHub ↗
(self, tokens: list[int])

Source from the content-addressed store, hash-verified

36 return [ord(char) for char in content]
37
38 def decode(self, tokens: list[int]) -> str:
39 chars: list[str] = []
40 for token in tokens:
41 try:
42 value = int(token)
43 except (TypeError, ValueError):
44 continue
45 if 0 <= value <= 0x10FFFF:
46 chars.append(chr(value))
47 return "".join(chars)
48
49
50class KnowledgeIndex(Protocol):

Callers 15

github_repo_statsFunction · 0.80
_finish_ffmpeg_writerFunction · 0.80
_wav2lip_prewarm_payloadFunction · 0.80
genFunction · 0.80
_txtFunction · 0.80
post_voice_cloneFunction · 0.80
handlerFunction · 0.80
parseVideoPayloadFunction · 0.80

Calls

no outgoing calls