Skip to content

Commit

Permalink
Added missing default=None to LLM.system_prompt (run-llama#9504)
Browse files Browse the repository at this point in the history
* Adding default=None to system_prompt to fix type errors

* Added CHANGELOG entry
  • Loading branch information
jamesbraza authored Dec 14, 2023
1 parent ef5db97 commit 9d4528d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ChangeLog

## Unreleased

### Bug Fixes / Nits

- Fixed missing `default=None` for `LLM.system_prompt` (#9504)

## [0.9.15] - 2023-12-13

### New Features
Expand Down
4 changes: 3 additions & 1 deletion llama_index/llms/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ async def gen() -> TokenAsyncGen:


class LLM(BaseLLM):
system_prompt: Optional[str] = Field(description="System prompt for LLM calls.")
system_prompt: Optional[str] = Field(
default=None, description="System prompt for LLM calls."
)
messages_to_prompt: MessagesToPromptType = Field(
description="Function to convert a list of messages to an LLM prompt.",
default=generic_messages_to_prompt,
Expand Down

0 comments on commit 9d4528d

Please sign in to comment.