8000 Merge branch 'main' into patch-2 · aiwaves-cn/RecurrentGPT@e32c9d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit

Permalink
Merge branch 'main' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelZhouwang authored Jun 17, 2023
2 parents c65c7b1 + dbeea84 commit e32c9d5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
)

def get_api_response(content: str, max_tokens=None):

chat = ChatOpenAI(
openai_api_key=OPENAI_API_KEY,
#model='gpt-3',
Expand All @@ -18,6 +19,18 @@ def get_api_response(content: str, max_tokens=None):
#model='gpt-4-0613',
#model='gpt-4-32k-0613',
temperature=0.5,


response = openai.ChatCompletion.create(
model='gpt-3.5-turbo-16k-0613',
messages=[{
'role': 'system',
'content': 'You are a helpful and creative assistant for writing novel.'
}, {
'role': 'user',
'content': content,
}],
temperature=0.5,
max_tokens=max_tokens
)
response = None
Expand Down

0 comments on commit e32c9d5

Please sign in to comment.
0