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

Assert user_id for RAG.setup() #268

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Conversation

isaac-chung
Copy link
Contributor

Missed check. Current behaviour:

In [15]: RAG.setup()
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ in <module>:1                                                                                    │
│                                                                                                  │
│ /Users/isaacchung/work/clarifai-python/clarifai/rag/rag.py:65 in setup                           │
│                                                                                                  │
│    62 │   │   >>> rag_agent = RAG.setup()                                                        │
│    63 │   """                                                                                    │
│    64 │   if not user_id:                                                                        │
│ ❱  65 │     raise UserError(                                                                     │
│    66 │   │     "user_id must be provided. It can be found at https://clarifai.com/settings.")   │
│    67 │   user = User(user_id=user_id, base_url=base_url, pat=pat)                               │
│    68 │   llm = Model(llm_url)                                                                   │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
UserError: user_id must be provided. It can be found at https://clarifai.com/settings.

Users must supply their user_id.

Copy link
Contributor

@sanjaychelliah sanjaychelliah left a comment

Choose a reason for hiding this comment

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

👍

@isaac-chung isaac-chung merged commit f8e04c3 into master Jan 10, 2024
17 checks passed
@isaac-chung isaac-chung deleted the isaac/check-user-id-for-rag branch January 10, 2024 15:38
@mogith-pn mogith-pn mentioned this pull request Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants