This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import modal | |
from pathlib import Path | |
# Variables | |
MODEL_DIR = Path("/models") | |
MODEL_NAME = "Qwen/Qwen2.5-7B-Instruct" | |
MODEL_REVISION = "a09a35458c702b33eeacc393d103063234e8bc28" | |
N_GPU = 1 | |
MINUTES = 60 | |
VLLM_PORT = 8000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import os | |
import shutil | |
from agents import Agent, Runner, gen_trace_id, trace | |
from agents.mcp import MCPServer, MCPServerStdio | |
async def run(mcp_server: MCPServer): | |
agent = Agent( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openai import OpenAI | |
from pydantic import BaseModel | |
import os | |
import instructor | |
client = OpenAI( | |
base_url="https://api.inference.net/v1", | |
api_key=os.getenv("INFERENCE_API_KEY"), | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from openai import OpenAI | |
import os | |
parameters = { | |
"messages": [ | |
{ | |
"role": "system", | |
"content": "You are a helpful assistant that can answer questions and uses tools to get information.", | |
}, | |
{"role": "user", "content": "What's the weather like in Paris today?"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pydantic import BaseModel | |
import instructor | |
from google.ai.generativelanguage_v1beta.types.file import File | |
import time | |
import google.generativeai as genai | |
client = instructor.from_gemini( | |
client=genai.GenerativeModel( | |
model_name="models/gemini-2.0-flash-exp", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Payments: | |
Fees: | |
- I'm really frustrated here. I've been trying to figure out Klarna charges for | |
over a week now, and no one told me whether there's an annual fee or any hidden | |
costs. I already have issues with late payment fees. Can someone help? | |
Gift Cards: | |
- I tried buying a gift card with Klarna, but I can't figure out how to send it | |
to my friend. | |
Payment issues: | |
- Hmm I can't find my payment plan for some reason even though it's active? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Account & settings: | |
- question: "What should I do if the email verification code for login isn't working?" | |
subcategory: "Login" | |
- question: "How do I enable two-factor authentication for my account for added security?" | |
subcategory: "Manage account" | |
- question: "What can I do if my Face ID isn't working for logging in?" | |
subcategory: "Login" | |
- question: "How can I update my phone number in my Klarna account?" | |
subcategory: "Manage account" | |
- question: "How do I update my account password?" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List, Optional | |
from pydantic import BaseModel, Field | |
from rich.console import Console | |
from tqdm.asyncio import tqdm_asyncio | |
import asyncio | |
import instructor | |
from datetime import date | |
from cerebras.cloud.sdk import AsyncCerebras | |
console = Console() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import json | |
from typing import Any, TypeVar, Literal | |
import asyncpg | |
from dotenv import load_dotenv | |
from braintrust import init | |
from pgvector.asyncpg import register_vector | |
from asyncio import Semaphore, timeout, run | |
from tqdm.asyncio import tqdm_asyncio as asyncio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cerebras.cloud.sdk import Cerebras | |
import instructor | |
import os | |
client = Cerebras( | |
api_key=os.environ.get("CEREBRAS_API_KEY"), | |
) | |
chat_completion = client.chat.completions.create( | |
model="llama3.1-8b", |
NewerOlder