Skip to content
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

Chat History Limitation Problem #2148

Open
ffarukkoc opened this issue Oct 29, 2024 · 3 comments
Open

Chat History Limitation Problem #2148

ffarukkoc opened this issue Oct 29, 2024 · 3 comments
Assignees
Labels
bug Something isn't working Python Change/fix applies to Python. If all three, use the 'JS & dotnet & Python' label

Comments

@ffarukkoc
Copy link

ffarukkoc commented Oct 29, 2024

Hello,

PromptManagerOptions has max_history_messages parameter but it doesn't working in Python.

prompts = PromptManager(PromptManagerOptions( prompts_folder=f"{os.getcwd()}/prompts", max_history_messages=4))

To fix this issue you can follow the steps below:
-> Go to (librarry) teams.ai.planners.action_planner.py
-> Go to LLMClientOptions
-> Add following code (line 141): max_history_messages=self._options.prompts._options.max_history_messages,

Image

Then max_history_messages parameter starts to work.

@singhk97 singhk97 self-assigned this Oct 29, 2024
@singhk97 singhk97 added bug Something isn't working Python Change/fix applies to Python. If all three, use the 'JS & dotnet & Python' label labels Oct 29, 2024
@singhk97
Copy link
Collaborator

Seems like a straightforward fix. Would you like to open a PR?

@ffarukkoc
Copy link
Author

Hello Singhk,

As you said, this issue include the solution also. I wrote it to help people who has same issue.
I am new on GitHub, PR means create a push request, right? I want to push this changes to production but I don't know how to do it. If you can guide me, I can do it.

@singhk97
Copy link
Collaborator

Sure. Here are the high level guidelines for contributing to the Python SDK.

  1. Create a fork of the teams-ai repo.
  2. Clone the fork on your local computer.
  3. Run a sample with the local bits. Replace teams-ai: 1.x.x with teams-ai: { path = "../../packages/ai", develop = true } in the pyproject.toml of the sample. See here for instructions for setting up a sample.
  4. Implement the solution in the teams.ai.planners.action_planner.py file and re-run the sample.
  5. Open a pull request in the teams-ai repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Python Change/fix applies to Python. If all three, use the 'JS & dotnet & Python' label
Projects
None yet
Development

No branches or pull requests

2 participants