Skip to content

Conversation

@kumarrah2002
Copy link
Contributor

@kumarrah2002 kumarrah2002 commented May 30, 2025

What does this PR do?

When testing the NewsAgent example in the README, there are multiple issues with the current implementation provided due to deprecation. The following changes have been made:

  1. OpenAI has changed the client functionCompletion to completions.
  2. The model text-davinci-003 has been deprecated and needs to be updated with a current model (I used gpt-3.5-turbo but it can be changed to any model in the OpenAI fleet)
  3. Retrieving the LLM response has to be done with llm_response.choices[0].message.content.strip() now.

These changes allow for seamless user experience when following the docs to make their own agent.

Sorry for the spam, I unintentionally pushed my new changes for a different problem to the wrong branch, hence the revert.

Before submitting
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • [✅] Did you read the contributor guideline, Pull Request section?
  • [✅] Did you make sure to update the docs?
  • Did you write any new necessary tests?

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link

codecov bot commented May 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86%. Comparing base (145daea) to head (814e330).
Report is 1 commits behind head on main.

Additional details and impacted files
@@         Coverage Diff         @@
##           main   #521   +/-   ##
===================================
  Coverage    86%    86%           
===================================
  Files        37     37           
  Lines      2557   2557           
===================================
  Hits       2191   2191           
  Misses      366    366           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@williamFalcon williamFalcon merged commit d21d90d into Lightning-AI:main Jun 1, 2025
21 checks passed
@kumarrah2002 kumarrah2002 deleted the edit_newsagent_example branch June 4, 2025 06:38
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.

4 participants