File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1- __version__ = "0.42 .0"
1+ __version__ = "0.43 .0"
22
33
44def get_sdk_version ():
Original file line number Diff line number Diff line change 22import re
33from typing import Any , Optional
44
5+ from llama_index .core .base .llms .types import CompletionResponseGen
56from llama_index .core .llms import LLM as LlamaIndexLLM
67from llama_index .core .llms import CompletionResponse
78from openai import APIError as OpenAIAPIError
@@ -80,6 +81,19 @@ def complete(
8081 except Exception as e :
8182 raise parse_llm_err (e ) from e
8283
84+ def stream_complete (
85+ self ,
86+ prompt : str ,
87+ ** kwargs : Any ,
88+ ) -> CompletionResponseGen :
89+ try :
90+ response : CompletionResponseGen = self ._llm_instance .stream_complete (
91+ prompt , ** kwargs
92+ )
93+ return response
94+ except Exception as e :
95+ raise parse_llm_err (e ) from e
96+
8397 def _get_llm (self , adapter_instance_id : str ) -> LlamaIndexLLM :
8498 """Returns the LLM object for the tool.
8599
You can’t perform that action at this time.
0 commit comments