-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_input
More file actions
42 lines (32 loc) · 863 Bytes
/
test_input
File metadata and controls
42 lines (32 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Okay, I'll modify the provided Python code to use the OpenAI API instead of the Gemini API.
```python tokens=265
# gemini_example.py
import os
import openai
openai.api_key = os.environ["OPENAI_API_KEY"]
# Create the model
model_engine = "gpt-3.5-turbo"
# Load the system prompt
with open("system_prompt.md", "r") as f:
system_prompt = f.read()
# Send the message to the model
response = openai.ChatCompletion.create(
model=model_engine,
messages=[
{"role": "system", "content": system_prompt},
{"role": "user", "content": "INSERT_INPUT_HERE"},
],
)
print(response.choices[0].message.content)
```
## Updated Progress Report
```json
{
"progress_report": {
"chunks": [
{
"chunk_id": "chunk_1",
"files": [
{
"file_path": "gemini_example.py",
"status": "completed"