Skip to content

Commit

Permalink
tutorial3
Browse files Browse the repository at this point in the history
  • Loading branch information
ronidas39 committed Oct 25, 2023
1 parent f92bdf5 commit d4583a2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tutorial3/chatCompletion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from langchain.adapters import openai
msg=openai.ChatCompletion.create(messages=[
{"role":"system","content":"you are an intelligent assistant who can answer anything very smartly"},
{"role":'user',"content":"who won most ballon dor"}
]
)
print(msg)
8 changes: 8 additions & 0 deletions tutorial3/conversion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from langchain.adapters import openai
#dic to msg
msg=openai.convert_dict_to_message({"role":"system","content":"you are an intelligent assistant who can answer anything very smartly"})
print(msg)

#dic to msgessage_to_dict(msg)
dic=openai.convert_m
print(dic)
Binary file added tutorial3/tutorial3.pptx
Binary file not shown.

0 comments on commit d4583a2

Please sign in to comment.