Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Adding create_preference_id client method.#12

Merged
acompa merged 2 commits into
mainfrom
a9-pref-id-method
Aug 6, 2024
Merged

Adding create_preference_id client method.#12
acompa merged 2 commits into
mainfrom
a9-pref-id-method

Conversation

@acompa
Copy link
Copy Markdown
Contributor

@acompa acompa commented Aug 6, 2024

Instead of demonstrating how users can create preference ids, let's do it for them.

This PR introduces a request method create_preference_id shamelessly cribbed from our docs. It's available both as a standalone method and a instance method of NotDiamond.

@acompa acompa changed the title Adding create_preference_id client method. Adding create_preference_id client method. Aug 6, 2024
@acompa
Copy link
Copy Markdown
Contributor Author

acompa commented Aug 6, 2024

Unit tests once I have a bit more time.

@acompa
Copy link
Copy Markdown
Contributor Author

acompa commented Aug 6, 2024

Okay, test ready - passes locally for me as well.

Looks like the builds previously failed with 529s - probably some concurrent API key usage for providers.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 6, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  notdiamond/llms
  client.py
  request.py 308
  notdiamond/toolkit
  custom_router.py
  tests/test_components/test_llms
  test_llm.py
Project Total  

This report was generated by python-coverage-comment-action

@acompa acompa merged commit 3037750 into main Aug 6, 2024
@acompa acompa deleted the a9-pref-id-method branch August 6, 2024 19:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants