MCPcopy Create free account
hub / github.com/InternLM/InternBootcamp / query

Function query

verl/agentic_workflow/backend.py:1–22  ·  view source on GitHub ↗
(prompt: str)

Source from the content-addressed store, hash-verified

1def query(prompt: str) -> str:
2 from openai import OpenAI
3 model_name = 'deepseekv3-1-terminus'
4 # 创建 OpenAI 客户端
5 client = OpenAI(
6 api_key= model_name,
7 base_url='http://100.96.35.28:18889/v1/' # 自定义部署或代理地址
8 )
9 # 构造对话请求
10 response = client.chat.completions.create(
11 model=model_name,
12 messages=[
13 {"role": "system", "content": "You are a helpful assistant."},
14 {"role": "user", "content": prompt}
15 ],
16 temperature=0.001,
17 max_tokens=16384,
18 timeout=100
19 )
20
21 # 输出结果
22 return response.choices[0].message.content
23
24
25if __name__ == "__main__":

Callers 14

task_generatorFunction · 0.90
case_functionFunction · 0.90
prompt_functionFunction · 0.90
prompt_classFunction · 0.90
cal_functionFunction · 0.90
extract_output_functionFunction · 0.90
reward_classFunction · 0.90
tools_classFunction · 0.90
interaction_classFunction · 0.90
instruction_yamlFunction · 0.90
tool_yamlFunction · 0.90

Calls 1

createMethod · 0.45

Tested by

no test coverage detected