Repository navigation
Conversation
mwien
left a comment
There was a problem hiding this comment.
Looks good overall, just a bunch of smaller comments
| response = client.models.generate_content(model="gemini-3.5-flash", | ||
| contents="Explain the theory of relativity in simple terms.") | ||
| print(response) | ||
| ``` |
There was a problem hiding this comment.
[req] I'm getting the warning Direct use of automatic function calling (AFC) in Models.generate_content is not recommended. Instead, we recommend to use AFC in Chat.send_message. Similarly, direct use of AFC in Models.generate_content_stream is not recommended. Instead, we recommend to use AFC in Chat.send_message_stream. when I run this.
|
|
||
| question = "What NFL team won the Super Bowl in the year Justin Bieber was born?" | ||
| print(llm_chain.invoke({'question': question})) | ||
| ``` |
There was a problem hiding this comment.
[req] Getting this warning:
UserWarning: WARNING! root_client is not default parameter. root_client was transferred to model_kwargs. Please confirm that root_client is what you intended. exec(code, self.locals) UserWarning: WARNING! root_async_client is not default parameter. root_async_client was transferred to model_kwargs. Please confirm that root_async_client is what you intended. exec(code, self.locals)
| { | ||
| label: 'SAP Cloud SDK (Python) - GitHub', | ||
| href: 'https://github.com/SAP/ai-sdk-python' | ||
| }, |
There was a problem hiding this comment.
[req] As discussed, let's keep these layout/template changes out of this PR
| }, | ||
| { | ||
| label: 'Support', | ||
| to: 'docs/overview/get-support' |
There was a problem hiding this comment.
[req] As discussed, let's keep these layout/template changes out of this PR
| from google.genai.types import GenerateContentConfig | ||
|
|
||
| def stream_genai(prompt, model_name='gemini-2.0-flash'): | ||
| def stream_genai(prompt, model_name='gemini-3.5-flash'): |
There was a problem hiding this comment.
[req] I'm getting the warning Direct use of automatic function calling (AFC) in Models.generate_content_stream is not recommended. Instead, we recommend to use AFC in Chat.send_message_stream. Similarly, direct use of AFC in Models.generate_content is not recommended. Instead, we recommend to use AFC in Chat.send_message.
| --- | ||
|
|
||
| The Document Grounding module implements Retrieval Augmented Generation (RAG). It is a module in the [Orchestration Service](./orchestration-service2.mdx). It uses the SAP HANA Vector Engine to retrieve relevant document context (the "context") and generate more accurate responses. | ||
| The Document Grounding module implements Retrieval Augmented Generation (RAG). It is a module in the [Orchestration Service·](./orchestration-service2.mdx). It uses the SAP HANA Vector Engine to retrieve relevant document context (the "context") and generate more accurate responses. |
There was a problem hiding this comment.
[pp, q] why the change here? is it just the extra space after Orchestration Service? If so, remove.
| trigger_res = pipelines.trigger_pipeline(trigger_req) | ||
| ``` | ||
|
|
||
| The trigger request returns immediately with a `202` response, but the pipeline does not transition to `INPROGRESS` right away. There is a short delay — typically a few seconds — before the pipeline actually starts executing. Poll `get_pipeline_status` until the status changes from `NEW` to `INPROGRESS` before proceeding. |
There was a problem hiding this comment.
[pp] Make this shorter, just mention that it's necessary to wait till INPROGRESS before proceeding. Also, for me it took more than a few seconds, but maybe that was just due to other reasons such as downtime of the service
|
|
||
| ### Executions and Documents | ||
|
|
||
| Execution records become available shortly after the pipeline starts. Querying executions immediately after triggering may result in a `404` error until the pipeline has had time to initialize. |
There was a problem hiding this comment.
[pp, q] Is it just about the remark above that one needs to wait till INPROGRESS? Then I think we do not need this additional comment about it.
|
|
||
| # Alternative initialization from environment | ||
| # client = EvaluationClient.from_env() | ||
| client = EvaluationClient.from_env() |
There was a problem hiding this comment.
[pp, q] is switching to the env file init strictly necessary?
| response = await bedrock.converse_stream( | ||
| messages=conversation, | ||
| inferenceConfig={"maxTokens": 512, "temperature": 0.0, "topP": 0.9}, | ||
| inferenceConfig={"maxTokens": 300, "temperature": 0.0, "topP": 0.9}, |
There was a problem hiding this comment.
[q] any reason for the change to maxTokens
What Has Changed?
Fix the correctness of the code snippets in the python docs. Since the
orchestration-serviceis going to be deprecated soon, its content is currently not considered.