Spaces:
Runtime error
Runtime error
#!/usr/bin/python3 | |
from langchain.llms import OpenAI | |
from langchain.callbacks.base import CallbackManager | |
from langchain.callbacks.openai_info import OpenAICallbackHandler | |
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler | |
import langchain | |
import os | |
print(langchain.__version__) | |
llm = OpenAI(temperature=0.9, callback_manager=CallbackManager([OpenAICallbackHandler()])) | |
text = "Hi, Could you help me choose a Chinese name? For example" | |
print(llm(text)) | |