Merge remote-tracking branch 'origin/main'
# Conflicts: # w1_d2/deepseek_api.py # w1_d2/llm-api-demo/01_deepseek_demo.py # w1_d2/llm-api-demo/02_qwen_demo.py # w1_d2/llm-api-demo/03_streaming_demo.py # w1_d2/llm-api-demo/05_deepseek_api_params_demo.py
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
class OpenAI():
|
||||||
|
def __init__(self,api_key,base_url):
|
||||||
|
self.api_key=api_key,
|
||||||
|
self.base_url=base_url
|
||||||
|
|
||||||
|
def create(self):
|
||||||
|
print('调用create1方法')
|
||||||
|
|
||||||
|
@property
|
||||||
|
def create2(self):
|
||||||
|
print('调用create2方法')
|
||||||
|
return '调用大模型'
|
||||||
|
|
||||||
|
client=OpenAI('123','www.wolin.com')
|
||||||
|
|
||||||
|
print(client)
|
||||||
|
print(client.api_key)
|
||||||
|
client.create()
|
||||||
|
print(client.create)
|
||||||
|
print(client.create2)
|
||||||
Reference in New Issue
Block a user