Skip to content

feat: Implement the LDAIClient and LDAITracker classes #1

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

jsonbailey
Copy link
Contributor

No description provided.

@jsonbailey jsonbailey requested a review from a team as a code owner June 6, 2025 21:50
@@ -0,0 +1,3 @@
# frozen_string_literal: true

require_relative 'ldclient-ai'
Copy link
Member

Choose a reason for hiding this comment

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

I don't think you need this file and the `lib/ldclient-ai.rb' file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was following this recommendation from: https://guides.rubygems.org/make-your-own-gem/

Code for your package is placed within the lib directory. The convention is to have one Ruby file with the same name as your gem, since that gets loaded when require "hola" is run. That one file is in charge of setting up your gem’s code and API.

It appears we also do this in https://github.com/launchdarkly/ruby-server-sdk/tree/main/lib to support autoloading via bundler.require.

devin-ai-integration bot and others added 3 commits June 10, 2025 21:31
- Add role validation to LDMessage class with VALID_ROLES constant
- Improve nil safety in track_tokens method using safe navigation operator
- Remove TODO comment by implementing proper role validation
- Add type checking for TokenUsage parameter in track_tokens method

Co-Authored-By: [email protected] <[email protected]>
@jsonbailey jsonbailey requested a review from keelerm84 June 12, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants