Spaces:
Sleeping
Sleeping
| ''' | |
| API呼び出し | |
| ''' | |
| # core/llm.py | |
| from openai import OpenAI | |
| client = OpenAI() | |
| def call_openai(system_prompt: str, context_prompt: str) -> str: | |
| response = client.responses.create( | |
| model="gpt-4.1-mini", | |
| instructions=system_prompt, | |
| input=context_prompt, | |
| max_output_tokens=100, | |
| ) | |
| return response.output_text.strip() |