mirror of
https://github.com/hwchase17/langchain
synced 2024-10-29 17:07:25 +00:00
13 lines
199 B
Plaintext
13 lines
199 B
Plaintext
|
```python
|
||
|
from langchain.llms import OpenAI
|
||
|
from langchain.chat_models import ChatOpenAI
|
||
|
|
||
|
llm = OpenAI()
|
||
|
chat_model = ChatOpenAI()
|
||
|
|
||
|
llm.predict("hi!")
|
||
|
>>> "Hi"
|
||
|
|
||
|
chat_model.predict("hi!")
|
||
|
>>> "Hi"
|
||
|
```
|