-
Notifications
You must be signed in to change notification settings - Fork 11
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
base: dev
Are you sure you want to change the base?
49 slack bot #50
Conversation
…nce-transformers to slackbot deps
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.
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> |
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.
Apologies, what does "Replace with collection" mean?
) | ||
|
||
db = Qdrant( | ||
client=QdrantClient(url="http://localhost:6334", prefer_grpc=True), |
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.
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 |
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.
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""" |
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.
"""Listen for button_click ation from message_hello""" | |
"""Listen for button_click action from message_hello""" |
sentence-transformers = "^2.2.2" | ||
torch = ">=2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0" |
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.
Are these dependencies used here?
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.
Apologies, what is this code for? I guess the Slackbot app is initialised with slackbot_socket.py?
No description provided.