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

[DEVX-300] Support PAT as arg #221

Merged
merged 5 commits into from
Nov 23, 2023
Merged

[DEVX-300] Support PAT as arg #221

merged 5 commits into from
Nov 23, 2023

Conversation

sainivedh
Copy link
Contributor

@sainivedh sainivedh commented Nov 23, 2023

What

  • Support PAT as parameter while initialising resources in addition to setting as env variable
  • Changed necessary methods in Inputs class to staticmethods

How

model = Model(url="https://clarifai.com/openai/chat-completion/models/GPT-3_5-turbo", pat="CLARIFAI_PAT")


print(model.predict_by_bytes(b"Hello World", "text"))

Tests

  • Initialised respective User, App, Model, Workflow classes w.r.t PAT in test_app.py, test_model_predict.py and workflow/test_predict.py

@sainivedh sainivedh marked this pull request as ready for review November 23, 2023 08:02
Copy link
Contributor

@isaac-chung isaac-chung left a comment

Choose a reason for hiding this comment

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

Much cleaner! One discussion comment.

clarifai/client/dataset.py Outdated Show resolved Hide resolved
@sainivedh sainivedh merged commit dfb3994 into master Nov 23, 2023
4 checks passed
@sainivedh sainivedh deleted the DEVX-300-support-pat-arg branch November 23, 2023 09:57
@sainivedh sainivedh mentioned this pull request Nov 23, 2023
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