MCPcopy Create free account
hub / github.com/FlyingFeather/DEA-SQL / ask_llm

Function ask_llm

llm/chat.py:70–81  ·  view source on GitHub ↗
(prompt, temp=None)

Source from the content-addressed store, hash-verified

68
69
70def ask_llm(prompt, temp=None):
71 key_config = args.key_config
72 key_version = args.key_version # gpt-35-turbo, gpt-4
73 api_key = CONFIG[key_config]["api_key"]
74 api_base = CONFIG[key_config]["api_base"]
75 engine = key_version
76 model_name = key_version
77 temperature = CONFIG["methods"]["temperature"]
78 if temp is not None:
79 temperature = temp
80 max_tokens = CONFIG["max_tokens"]
81 return connect_gpt(engine, api_key, api_base, prompt, max_tokens, temperature)

Callers 7

runMethod · 0.90
get_features_by_llmMethod · 0.90
get_question_typeMethod · 0.90
get_sql_by_llmMethod · 0.90
correct_sql_selfFunction · 0.90
correct_sql_by_caseFunction · 0.90

Calls 1

connect_gptFunction · 0.85

Tested by

no test coverage detected