pankajastro commented on code in PR #36590: URL: https://github.com/apache/airflow/pull/36590#discussion_r1441733853
########## tests/system/providers/pinecone/example_pinecone_cohere.py: ########## @@ -0,0 +1,79 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +from __future__ import annotations + +import os +import time +from datetime import datetime + +from airflow import DAG +from airflow.decorators import setup, task, teardown +from airflow.providers.cohere.operators.embedding import CohereEmbeddingOperator +from airflow.providers.pinecone.operators.pinecone import PineconeIngestOperator + +index_name = os.getenv("INDEX_NAME", "example-pinecone-index") +namespace = os.getenv("NAMESPACE", "example-pinecone-index") +data = [ + "Alice Ann Munro is a Canadian short story writer who won the Nobel Prize in Literature in 2013. Munro's work has been described as revolutionizing the architecture of short stories, especially in its tendency to move forward and backward in time." +] + +with DAG( + "example_pinecone_cohere", + schedule_interval=None, + start_date=datetime(2023, 1, 1), + catchup=False, +) as dag: + # [START howto_operator_pinecone_ingest] Review Comment: ```suggestion ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
