Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何修改spark api的 temperature? #3

Open
ivan9394 opened this issue Nov 14, 2023 · 1 comment
Open

如何修改spark api的 temperature? #3

ivan9394 opened this issue Nov 14, 2023 · 1 comment

Comments

@ivan9394
Copy link

ivan9394 commented Nov 14, 2023

config = SparkConfig().model_dump()
api = SparkAPI(config)
使用官方example创建api实例, 但如何修改实例中的temperature?
目前是使用.env的方式读入该参数, 但也没法查看api中的temper是多少呀
api.dict 返回的是:
{'app_id': 'b2
*',
'api_key': '3a92596***',
'api_secret': 'Y2VjY*****3',
'api_model': 'v2.0',
'_wss_url': None}

所以temperature在哪里呢?

@compilelife
Copy link

看源码,可以这么改:api.get_completion(f.read(), max_tokens=4096, temperature=0.4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants