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

Fix stream chat param error in CondenseQuestionChatEngine #11856

Merged
merged 2 commits into from
Mar 12, 2024
Merged

Fix stream chat param error in CondenseQuestionChatEngine #11856

merged 2 commits into from
Mar 12, 2024

Conversation

HollowMan6
Copy link
Contributor

Description

Now the signature of response.write_response_to_history has changed into

def write_response_to_history(
    self,
    memory: BaseMemory,
    on_stream_end_fn: Optional[callable] = None,
    raise_error: bool = False,
) -> None
Exception in thread Thread-2 (write_response_to_history):
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
 self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.12/site-packages/llama_index/core/chat_engine/types.py", line 139, in write_response_to_history
    on_stream_end_fn()
 TypeError: 'bool' object is not callable

Version Bump?

Did I bump the version in the pyproject.toml file of the package I am updating? (Except for the llama-index-core package)

  • Yes
  • No

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added new unit/integration tests
  • Added new notebook (that tests end-to-end)
  • I stared at the code and made sure it makes sense

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added Google Colab support for the newly added notebooks.
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I ran make format; make lint to appease the lint gods

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 12, 2024
HollowMan6 and others added 2 commits March 12, 2024 16:31
Now the signature of response.write_response_to_history has changed into
```python
def write_response_to_history(
    self,
    memory: BaseMemory,
    on_stream_end_fn: Optional[callable] = None,
    raise_error: bool = False,
) -> None
```

```log
Exception in thread Thread-2 (write_response_to_history):
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
 self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.12/site-packages/llama_index/core/chat_engine/types.py", line 139, in write_response_to_history
    on_stream_end_fn()
 TypeError: 'bool' object is not callable
```

Signed-off-by: Songlin Jiang <songlin.jiang@csc.fi>
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 12, 2024
@logan-markewich logan-markewich enabled auto-merge (squash) March 12, 2024 17:30
@logan-markewich logan-markewich merged commit 11578cf into run-llama:main Mar 12, 2024
8 checks passed
bdonkey added a commit to bdonkey/gpt_index that referenced this pull request Mar 12, 2024
* main:
  add retries for openai LLM rate limit errors (run-llama#11867)
  Fix stream chat param error in CondenseQuestionChatEngine (run-llama#11856)
  Add logprobs field to `CompletionResponse` (run-llama#11855)
  Google readers integrations doc and drive updates (run-llama#11724)
  Adds llamafile support for local LLM and embeddings (run-llama#11709)
  Add QueryUnderstandingAgent LlamaPack (run-llama#11558)
  Split Google docs on headings (run-llama#11535)
  add baidu vectordb as vector store (run-llama#11494)
  [Feature Request]: add PowerPoint support to Confluence reader run-llama#10592 (run-llama#11454)
  add modelscope llm support (run-llama#11270)
  Add cohere command-R model (run-llama#11852)
  Fixed some gramatical mistakes  (run-llama#11840)
  fix obj insert_nodes (run-llama#11836)
  added table comment to Table Info in SQLDatabase (run-llama#11774)
  Fixes for add and delete Methods in LanceDBVectorStore (run-llama#11825)
  add support for open-mixtral-8x7b (run-llama#11792)
  Adds new LabelledSimpleDataset (llama-dataset) (run-llama#11805)
  Fix Cohere Embeddings issue run-llama#11820 (run-llama#11822)
  Update verifying connection (run-llama#11821)
  bump mistralai deps (run-llama#11819)
Izukimat pushed a commit to Izukimat/llama_index that referenced this pull request Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants