Skip to content

Commit

Permalink
Regenerate Quickstart guide markdown (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lothiraldan authored Nov 6, 2024
1 parent 57e0056 commit 0a60e44
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,13 +554,6 @@
"\n",
"![Trace UI](https://raw.githubusercontent.com/comet-ml/opik/main/apps/opik-documentation/documentation/static/img/cookbook/chain_density_trace_comparison_cookbook.png)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ We will first install the required dependencies and configure both Opik and Open


```python
%pip install -U --quiet opik openai requests PyPDF2
%pip install -U opik openai requests PyPDF2
```


Expand All @@ -22,14 +22,9 @@ We will first install the required dependencies and configure both Opik and Open
```python
import opik
import os
import getpass

# Configure Opik
opik.configure()

# Configure the OpenAI API key
if "OPENAI_API_KEY" not in os.environ:
os.environ["OPENAI_API_KEY"] = getpass.getpass("Enter your OpenAI API key: ")
```

## Implementing Chain of Density Summarization
Expand Down Expand Up @@ -70,7 +65,13 @@ from opik.integrations.openai import track_openai
from openai import OpenAI
import opik

openai_client = track_openai(OpenAI())
# Use a dedicated quickstart endpoint, replace with your own OpenAI API Key in your own code
openai_client = track_openai(
OpenAI(
base_url="https://odbrly0rrk.execute-api.us-east-1.amazonaws.com/Prod/",
api_key="Opik-Quickstart",
)
)


@opik.track
Expand Down Expand Up @@ -315,6 +316,7 @@ import io
from PyPDF2 import PdfReader
from typing import Dict


# Load and extract text from PDFs
@opik.track
def load_pdf(pdf_url: str) -> str:
Expand Down

0 comments on commit 0a60e44

Please sign in to comment.