MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / draw_term

Function draw_term

bmtools/tools/meta_analysis/api.py:76–84  ·  view source on GitHub ↗
(topic)

Source from the content-addressed store, hash-verified

74 return docs
75
76def draw_term(topic):
77 prp = """Concatenate the searching keywords (fewer than 5) in the topic with '+'. For example, when given 'experiments about the harmness of using insulin for teenagers to treat diabetes', answer me with 'insulin+harmness+diabetes+teenager'; when given 'The Operational Situation of Bookstores after Digitalization of Reading', answer me with 'bookstore+digitalization'. Topic: """+topic+'. Give me the answer with no extra words. '
78 response = generate_response(prp)
79 terms = response.replace('\n', ' ').split('+')
80 st = ''
81 for term in terms[:4]:
82 st+=term+'+'
83 print(st)
84 return st[:-1]
85
86def initial(topic, term=None, ret=100):
87 if term is None:

Callers 1

initialFunction · 0.85

Calls 1

generate_responseFunction · 0.85

Tested by

no test coverage detected