MCPcopy Create free account
hub / github.com/codefuse-ai/codefuse-devops-eval / get_chatrounds_ids

Function get_chatrounds_ids

src/models/test.py:69–74  ·  view source on GitHub ↗
(chatrounds_list)

Source from the content-addressed store, hash-verified

67
68
69def get_chatrounds_ids(chatrounds_list):
70 input_ids = []
71 for chatround in chatrounds_list:
72 input_ids += tokenizer.encode(role_start + chatround["role"]+ role_end) + tokenizer.encode(chatround["content"], add_special_tokens=False) + [tokenizer.eos_token_id]
73 input_ids += tokenizer.encode(role_start + "bot" + role_end)
74 return input_ids
75
76class GetAssistantAns():
77 # 按照自己推理需求自己修改代码

Callers 1

gen_answerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected