20 lines
419 B
Python
20 lines
419 B
Python
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)
|