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

49 slack bot #50

Open
wants to merge 51 commits into
base: dev
Choose a base branch
from
Open

49 slack bot #50

wants to merge 51 commits into from

Conversation

sqr00t
Copy link

@sqr00t sqr00t commented Aug 23, 2023

No description provided.

@sqr00t sqr00t linked an issue Aug 23, 2023 that may be closed by this pull request
8 tasks
@beingkk
Copy link
Contributor

beingkk commented Aug 31, 2023

FYI @sqr00t you will also be able to close #29 with this PR

@sqr00t sqr00t linked an issue Aug 31, 2023 that may be closed by this pull request
@sqr00t sqr00t marked this pull request as ready for review November 8, 2023 16:39
@sqr00t sqr00t requested a review from beingkk November 8, 2023 16:40
Copy link
Contributor

@beingkk beingkk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sqr00t, thank you very much for this - I've looked through and it looks good to me to merge!

There is a quite a lot of stuff there that I haven't explored too much (Qdrant, Langchain, asyncio, Bolt) so I'm mostly learning her and my comments are quite minor and limited.

It would be great to have a session at some point with you explaining a bit more how the Slack API works (eg, what are the say and ack variables) and how should we set this up (eg do you run it locally at the moment, or do you host on ec2?)

Do you think you'll have time to adjust the formatting of the outputs (as we've chatted about on Slack) - or otherwise, I can also try to help when I'm back from leave (from Nov 20th)

export OPENAI_API_KEY= #<OpenAI API key>
export QDRANT_URL= #<Qdrant cluster URL>
export QDRANT_API_KEY= #<Qdrant API key>
export QDRANT_COLLECTION_NAME=nesta_way_bge-base-v1.5-en_big-chunks # <Replace with collection>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, what does "Replace with collection" mean?

)

db = Qdrant(
client=QdrantClient(url="http://localhost:6334", prefer_grpc=True),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit confused about this - are you running Qdrant locally or using their cloud?

await respond(f"""Searched the Nesta Way for: {command['text']}\nResult(s):\n{docs}""")


@app.command("/nw_ask") # noqa: E302
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh exciting, I haven't tried this command yet - I've only tested nw_search


@app.action("button_click")
async def action_button_click(body, ack, say): # noqa: ANN001, ANN201
"""Listen for button_click ation from message_hello"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"""Listen for button_click ation from message_hello"""
"""Listen for button_click action from message_hello"""

Comment on lines +76 to +77
sentence-transformers = "^2.2.2"
torch = ">=2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these dependencies used here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, what is this code for? I guess the Slackbot app is initialised with slackbot_socket.py?

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.

Nesta Way Slack bot Slack interface
2 participants