Not-Diamond / notdiamond-python

Not Diamond Python SDK
54 stars 8 forks source link

Adding `create_preference_id` client method. #12

Closed acompa closed 3 months ago

acompa commented 3 months ago

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 commented 3 months ago

Unit tests once I have a bit more time.

acompa commented 3 months ago

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[bot] commented 3 months ago

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