0
0
mirror of https://github.com/MIDORIBIN/langchain-gpt4free.git synced 2025-01-11 18:51:03 +03:00
langchain-gpt4free/sample.py

19 lines
330 B
Python
Raw Normal View History

2023-07-08 11:37:54 +03:00
from g4f import Provider, Model
from langchain.llms.base import LLM
from langchain_g4f import G4FLLM
def main():
llm: LLM = G4FLLM(
model=Model.gpt_35_turbo,
provider=Provider.Aichat,
)
res = llm('hello')
print(res) # Hello! How can I assist you today?
if __name__ == '__main__':
main()