-
Notifications
You must be signed in to change notification settings - Fork 62
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
add linkup API #295
base: master
Are you sure you want to change the base?
add linkup API #295
Conversation
"depth": depth, | ||
"output_type": "searchResults", | ||
} | ||
return self.client.search(**payload) |
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.
You can replace this with
return self.client.search({
"query": query,
"depth": depth,
"output_type": "searchResults",
})
def text__search( | ||
self, | ||
query: str, | ||
depth: str="deep", |
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.
This should not have a default value.
} | ||
return self.client.search(**payload) | ||
except Exception as e: | ||
print("DEBUG - Exception occurred:", str(e)) |
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.
You can probably remove this debug print.
|
||
class LinkupSearch: | ||
|
||
|
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.
Unnecessary empty lines.
|
||
class LinkupSource: | ||
|
||
|
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.
Unecessary empty lines
def text__question_answer( | ||
self, | ||
query: str, | ||
depth: str="", |
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.
Is this default value really necessary?
"depth": depth, | ||
"output_type": "sourcedAnswer", | ||
} | ||
return self.client.search(**payload) |
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.
You can replace this with
return self.client.search({
"query": query,
"depth": depth,
"output_type": "sourcedAnswer",
})
} | ||
return self.client.search(**payload) | ||
except Exception as e: | ||
print("DEBUG - Exception occurred:", str(e)) |
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.
You can probably remove this debug print.
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.
Can you rename this file to linkup_answer.py
from typing import Optional, List | ||
|
||
|
||
class LinkupSource: |
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.
Can you rename this class LinkupAnswer
No description provided.