umarigan/deepseek-r1-reasoning-prompts
Updated
•
2
openaccess-ai-collective/oo-gpt4-filtered
dataset:from tqdm import tqdm
import time
reasoning_data = []
for example in tqdm(ds, desc="answering"):
try:
response = client.chat.completions.create(
model='deepseek-reasoner', # Using DeepSeek-R1 for reasoning
messages=[
{"role": "system", "content": example['system_prompt']},
{"role": "user", "content": example['question']},
],
stream=False,
max_tokens=4096,
temperature=0.7,
)
answer = response.choices[0].message.content
reasoning = response.choices[0].message.reasoning_content
reasonng_example = {
"id": example['id'],
"question": example['question'],
'answer': answer,
'reasoning': reasoning,
}
reasoning_data.append(reasonng_example)
except Exception as e:
print(f"Error translating example: {e}")
time.sleep(3) # Wait for 3 seconds before continuing
continue # Skip the current example and move to the next one