question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Request to Return Additional Information in CompleteAsync Method and Store it in ContextVariables

See original GitHub issue

Currently, the CompleteAsync method only returns a response string. I would like to request that additional information such as status codes be returned as well.

I suggest that the CompleteAsync method in ITextCompletion should return some type T instead of a string to allow for this. This would enable us to gather more information about the response and make it easier to handle different scenarios.

Furthermore, I would like to propose that the ContextVariables class be updated to use a ConcurrentDictionary<string, object> instead of ConcurrentDictionary<string, string>. This would allow for the storage of variables of different types and make the class more flexible.

Please let me know if these changes are feasible and if there are any concerns or suggestions for improvement. Thank you for your time and consideration.

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Reactions:6
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
evchakicommented, Apr 6, 2023

Thanks for the feedback the team is looking into this.

0reactions
DavidLuong98commented, Jun 30, 2023

@RogerBarreto @matthewbolanos Looks good, thank you both.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Repository pattern return element in only read
1 Answer. You can use . AsNoTracking() which detaches the entity returned from your context. Any changes you make aren't tracked by the...
Read more >
Java CompletableFuture Tutorial with Examples
In this tutorial you'll learn What CompletableFuture is and how to use CompletableFuture for asynchronous programming in Java.
Read more >
Process asynchronous tasks as they complete (C#)
In each iteration of a while loop, an awaited call to WhenAny returns the task in the collection of tasks that finishes its...
Read more >
Azure Service Bus trigger for Azure Functions
Learn to run an Azure Function when as Azure Service Bus messages are created.
Read more >
Improving Performance with Java's CompletableFuture
In this article, we will learn how to use CompletableFuture to increase the performance of our application. We'll start with looking at the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found