Created
July 12, 2023 06:19
-
-
Save alonsosilvaallende/f0c579a9b8e28ba2035327824ded4663 to your computer and use it in GitHub Desktop.
llm_GPT-4-32K-OpenRouter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def llm(text: str) -> str: | |
return openai.ChatCompletion.create( | |
model='openai/gpt-4-32k', | |
headers={ | |
"HTTP-Referer": OPENROUTER_REFERRER | |
}, | |
messages=[{ | |
'role': 'user', | |
'content': f'{text}' | |
}], | |
temperature=0.9).choices[0].message.content |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment