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

add linkup API #295

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

juliette0704
Copy link

No description provided.

@juliette0704 juliette0704 marked this pull request as draft January 3, 2025 08:07
@juliette0704 juliette0704 marked this pull request as ready for review January 7, 2025 08:51
"depth": depth,
"output_type": "searchResults",
}
return self.client.search(**payload)

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",

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))

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:


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:


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="",

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)

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))

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.

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:

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

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

Successfully merging this pull request may close these issues.

2 participants