Python ? OpenAI API? ???? ???? ???? ????? ??? ???? ?? ??? ???? ?? ??? ??? ????? ???? ??? ????? ??? ???? ?? ? ? ????.
OpenAI API ? Python? ????? ??? ??? ???? ???? ??? ?? (? : NVIDIA? ?? ?? ??)? ???? ? ??? ? ????.-
OpenAI API ? Python? CSV ?? (? : ?? ?? ??? ??)? ???? ? ???? ?? ?, ?? ??/??? ? 0?? 3??? "?? ?? ??"? ?? ? ???? (0? ??? ??????. , 3? ??? ? ?? ??? ?????).
-
?? ??? ???? ????? ???? ? ??? ???? Glob Library? ?? ? ? ??? ???? ? ??? ??? ?? ? ?? ??? ??? ??? ?? ???? ??? ? ????. - ? ????? ???? Python ? OpenAI API? ???? ???? ???? ???? ??? ?????.
-
OpenAI API ? Python? ???? ???? ???? ??? ???? ???.
??
??? ??? ??
? ??????? Python? Nvidia? ?? ?? ??? ???? ?? ???? ???? ?????.
?? ?? ? ??? ??? ??? ??? ??????.
? ??? ???? ? NVIDIA ?? ??? ???? ?? ?? ??? Extract_Info ??? ?????.
Extract_Info ??? ????? ???? ??? ???? ???? ?? = 0.3 ? model = "gpt-3.5-turbo-16k"? ?????. "GPT-3.5-Turbo-16K"??? ???? ???? ???? ?? ? ???? ?? ? ? ???? ?????. ? ??? OpenAi.ChatCompletion.Create Endpoint? ???? ??? ?? ?? ? ?? ??? ??? ???? ?????.
Nvidia? ?? : 2024 ?? ?? 2/4 ??? Nvidia? 2 ?? ?? 135 ? ??? ??? ?????, ? ?? 88% ??? ?? ?? 101% ??? ??? ??????.
???? ??? ? Python ??? ?? ??? ??? ?? ????.
? ??????? Kaggle? Hsankesara?? ?? ?? ??? ?? CSV ??? ??? ??????. ? CSV ?? ??? CSV ??? "??"? "??"?? ???? ? ???? ?? ? ? ?? ??/???? ????. ?? ?? ???? ?? ??? ??? ??? ??? ? ?? 0 ~ 3“?? ??? ??”? ?????? ? ??? ???? ? ???? ????? (0? ?? ???? ??? ?????. ????.
????, ? ??? ??? ???? ??? ???? (???? ??) ??? "?? ??"? ?????.
?? ?? index = false? ???? CSV ??? ??????.
? ??> <<> ?? ?? ??
Python ?? ??? ??? ???? ??? ??? ?? ?? ??? ?????.
??
OpenAI API? ??? ????? ???????. API? ?? ? ?? ???? ?? ?? ????? OpenAI? ???? ?????? ??? ??? ????. ??? ?? ??? ???? ????? API? ????? ???? ??? ?? ?? ??? ???? ?? ?????.
pip3 install openai pandas
AI? ?? ?? : NVIDIA? AI ??? ? ??? ? ??? ???? ?? ??? ??? ?????. ??? HGX ????? ?? ???? ??? ?? ?? ? ??? ??? ??? ??? ??????. ?? ???, ??? ? ??????? ?? ??? ???? ?? ?? ??? ??? ?? ?????. Nvidia? ??? ?? ??? ???? ?? ??? ???? ????? ?? ?? ?? ??? ???? ?????.
? ??? ??? ??? ???? ? ???? ??? ?? ????. CSV? ???? ?? ??? ??? ???? ? ?? ?????.
?????, ??? ????? ??? ?? (Nvidia? ??, NVIDIA? ?? ??? ? ?, ?? ??? ?? ??)? ??? ??? ???? ?????.
pip3 install openai pandas
completions = openai.ChatCompletion.create(
model="gpt-3.5-turbo-16k",
messages=[
{"role": "user", "content": prompt+"\n\n"+text}
],
temperature=0.3,
)
<code>從文本中提取以下信息:
英偉達(dá)的收入
英偉達(dá)本季度做了什么
關(guān)于人工智能的評(píng)論
英偉達(dá)財(cái)報(bào)記錄在此處</code>
{
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "實(shí)際響應(yīng)",
"role": "assistant"
}
}
],
"created": 1693336390,
"id": "request-id",
"model": "gpt-3.5-turbo-16k-0613",
"object": "chat.completion",
"usage": {
"completion_tokens": 579,
"prompt_tokens": 3615,
"total_tokens": 4194
}
}
?? ?? for ???? ??? ???? ??? ????.
for di in range(len(df)):
title = titles[di]
abstract = articles[di]
additional_params = extract_info('Title: '+str(title) + '\n\n' + 'Text: ' + str(abstract))
try:
result = additional_params.split("\n\n")
except:
result = {}
?? ??? ??? ?? ???? ? ?? ??? ??? ??? ??? ??????.
? ??? OpenAI API? ???? ????? ??? ??? ???? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

???? Python ?? ?? ?????? ?? ????, "??? ?????, ?? ??"? ???? ??? ??? ??? ?? ??? ?????. 1. ???? ?? ? ??? ?? ?????. ?? ???? ?? ??? ???? ??? ? ? ????. ?? ??, Spoke () ?? ???? ??? ??? ?? ??? ?? ????? ?? ??? ??? ????. 2. ???? ?? ???? ??? ??? ?????? Draw () ???? ???? ????? ?? ???? ?? ??? ???? ??? ???? ?? ?? ?? ??? ????? ?? ?? ????? ?? ?????. 3. Python ?? ???? ???????. ?? ???? ??? ???? ?? ???? ??? ????? ??? ?? ???? ??? ???? ????. ??? ??? ??? ???? ? ??? "?? ??"??????. 4. ???? ? ???? ?? ??? ?????

???? __iter __ () ? __next __ () ???? ???? ?????. ???? ??? ? ??? ????, ?? ???? ?? ??? ??? ???? ?????. 1. ???? ?? () ?? ? ??? ??? ???? ? ?? ??? ?? ? ?? ???? ??? ????. 2. ???? ?? ??? ???? ??? ???? ???? ???? ???? ?? ???? ?????. 3. ???? ???? ?? ??? ?? ? ? ? ??? ?? ? ???????? ? ? ??? ?? ??? ??? ???? ?? ? ? ???? ??????. ?? : ??? ?? ???? ??? ???? ????. ???? ?? ?? ? ??? ?????? ???? ? ?? ?? ? ? ????.

API ??? ??? ??? ?? ??? ???? ???? ???? ????. 1. Apikey? ?? ??? ?? ????, ????? ?? ?? ?? URL ?? ??? ?????. 2. Basicauth? ?? ???? ??? Base64 ??? ??? ??? ??? ????? ?????. 3. OAUTH2? ?? Client_ID ? Client_Secret? ?? ??? ?? ?? ?? ??? BearEtroken? ???????. 4. ?? ??? ???? ?? ?? ?? ???? ????? ???? ?? ?? ? ????. ???, ??? ?? ??? ??? ???? ?? ??? ???? ???? ?? ?????.

Assert? ????? ???? ???? ?? ? ???? ??? ???? ??? ?? ?? ????. ??? ??? ??? ?? ??? ?????, ?? ?? ?? ??, ?? ?? ?? ?? ?? ?? ??? ????? ?? ?? ??? ?? ???? ??? ? ??? ??? ??? ??? ?? ???????. ?? ??? ???? ?? ?? ???? ?? ????? ??? ? ????.

????? ??? ? ??? ??? ?? ??? ???? ??? zip () ??? ???? ????.? ??? ?? ??? ???? ?? ??? ?? ????. ?? ??? ???? ?? ?? itertools.zip_longest ()? ???? ?? ?? ? ??? ?? ? ????. enumerate ()? ???? ??? ???? ?? ? ????. 1.zip ()? ???? ????? ?? ??? ??? ??? ?????. 2.zip_longest ()? ???? ?? ??? ?? ? ? ???? ?? ? ????. 3. Enumental (Zip ())? ??? ??? ????? ??? ???? ???? ?? ???? ?? ? ????.

inpython, iteratorsareobjectsthatlowloppingthroughcollections __ () ? __next __ ()

typehintsinpythonsolvetheproblemombiguityandpotentialbugsindynamicallytypedcodebyallowingdevelopscifyexpectiontypes. theyenhancereadability, enablearylybugdetection ? improvetoomingsupport.typehintsareaddedusingaColon (:) forvariblesAndAramete

Python? ???? ????? ???? API? ???? Fastapi? ?????. ?? ??? ?? ????? ?????? ??? ??? ??? ???? ?? ? ? ????. Fastapi ? Asgi Server Uvicorn? ?? ? ? ????? ??? ??? ? ????. ??? ??, ?? ?? ?? ? ???? ?????? API? ???? ?? ? ? ????. Fastapi? ??? HTTP ??? ???? ?? ?? ? Swaggerui ? Redoc Documentation Systems? ?????. ?? ??? ?? URL ?? ??? ?? ? ??? ??, ?? ?? ??? ???? ???? ?? ?? ??? ??? ? ????. Pydantic ??? ???? ??? ?? ???? ???? ????? ? ??? ? ? ????.
