-
Notifications
You must be signed in to change notification settings - Fork 87
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
Feature GenAI #43
base: master
Are you sure you want to change the base?
Feature GenAI #43
Conversation
pyalgotrading/algobulls/api.py
Outdated
`GET` v1/build/python/genai Get GenAI response | ||
""" | ||
endpoint = 'v1/build/python/genai' | ||
params = {"userPrompt": user_prompt, 'sessionId': self.genai_session_id, 'openaiApiKey': self.genai_api_key, 'chat_gpt_model': chat_gpt_model} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all keys should be camelcase
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, will correct that
""" | ||
assert isinstance(api_key, str), f'Argument "api_key" should be a string' | ||
self.api.openai_key = api_key | ||
return 'SUCCESS' or 'FAILURE' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to understand this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, so currently we don't have a way to directly verify if the given key is valid, we won't find out till the first chat is initiated. So need to decide on logic if it's a success or failure. Will remove this later. we are still finding a way to efficiently verify the key.
7ef8ac8
to
9ded473
Compare
9ded473
to
d5bada5
Compare
5ef1840
to
4fbff0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add docstrings wherever necessary
6769174
to
35e5b46
Compare
6ea1b04
to
f2f68bc
Compare
Screenshots