MCPcopy Create free account
hub / github.com/DataArcTech/ToG / generate_answer

Function generate_answer

ToG/wiki_func.py:170–175  ·  view source on GitHub ↗
(question, cluster_chain_of_entities, args)

Source from the content-addressed store, hash-verified

168
169
170def generate_answer(question, cluster_chain_of_entities, args):
171 prompt = answer_prompt_wiki + question + '\n'
172 chain_prompt = '\n'.join([', '.join([str(x) for x in chain]) for sublist in cluster_chain_of_entities for chain in sublist])
173 prompt += "\nKnowledge Triplets: " + chain_prompt + 'A: '
174 result = run_llm(prompt, args.temperature_reasoning, args.max_length, args.opeani_api_keys, args.LLM_type)
175 return result
176
177
178def entity_prune(total_entities_id, total_relations, total_candidates, total_topic_entities, total_head, total_scores, args, wiki_client):

Callers 1

half_stopFunction · 0.70

Calls 1

run_llmFunction · 0.70

Tested by

no test coverage detected