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

Function generate_response

bmtools/tools/meta_analysis/api.py:15–22  ·  view source on GitHub ↗
(prompt, token=2500)

Source from the content-addressed store, hash-verified

13
14@retry(wait=wait_random_exponential(min=1, max=20), stop=stop_after_attempt(6))
15def generate_response(prompt, token=2500):
16 response = openai.Completion.create(
17 model='text-davinci-003',
18 prompt=prompt,
19 temperature=0.1,
20 max_tokens=min(2500,token),
21 )
22 return response['choices'][0]['text']
23
24@retry(wait=wait_random_exponential(min=1, max=20), stop=stop_after_attempt(6))
25def get_embedding(text: str, model="text-embedding-ada-002"):

Callers 6

draw_termFunction · 0.85
split_questionFunction · 0.85
check_docFunction · 0.85
draw_conclusionFunction · 0.85
draw_subtableFunction · 0.85
extra_drawFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected