You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NotImplementedError Traceback (most recent call last)
Cell In[8], line 21
18 # LLM with function call
19 # llm = ChatOpenAI(model="gpt-3.5-turbo-0125", temperature=0)
20 llm = GoogleGenerativeAI(model="gemini-pro", temperature=0.7)
---> 21 structured_llm_grader = llm.with_structured_output(GradeDocuments)
23 # Prompt
24 system = """You are a grader assessing relevance of a retrieved document to a user question. \n
25 If the document contains keyword(s) or semantic meaning related to the question, grade it as relevant. \n
26 Give a binary score 'yes' or 'no' score to indicate whether the document is relevant to the question."""
File c:\Users\Acer\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain_core\language_models\base.py:208, in BaseLanguageModel.with_structured_output(self, schema, **kwargs)
204 def with_structured_output(
205 self, schema: Union[Dict, Type[BaseModel]], **kwargs: Any
206 ) -> Runnable[LanguageModelInput, Union[Dict, BaseModel]]:
207 """Implement this if there is a way of steering the model to generate responses that match a given schema.""" # noqa: E501
--> 208 raise NotImplementedError()
NotImplementedError:
The text was updated successfully, but these errors were encountered:
NotImplementedError Traceback (most recent call last)
Cell In[8], line 21
18 # LLM with function call
19 # llm = ChatOpenAI(model="gpt-3.5-turbo-0125", temperature=0)
20 llm = GoogleGenerativeAI(model="gemini-pro", temperature=0.7)
---> 21 structured_llm_grader = llm.with_structured_output(GradeDocuments)
23 # Prompt
24 system = """You are a grader assessing relevance of a retrieved document to a user question. \n
25 If the document contains keyword(s) or semantic meaning related to the question, grade it as relevant. \n
26 Give a binary score 'yes' or 'no' score to indicate whether the document is relevant to the question."""
File c:\Users\Acer\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain_core\language_models\base.py:208, in BaseLanguageModel.with_structured_output(self, schema, **kwargs)
204 def with_structured_output(
205 self, schema: Union[Dict, Type[BaseModel]], **kwargs: Any
206 ) -> Runnable[LanguageModelInput, Union[Dict, BaseModel]]:
207 """Implement this if there is a way of steering the model to generate responses that match a given schema.""" # noqa: E501
--> 208 raise NotImplementedError()
NotImplementedError:
The text was updated successfully, but these errors were encountered: