Closed Granipouss closed 4 months ago
``` import os from literalai import LiteralClient from openai import OpenAI openai_client = OpenAI( api_key=) literal_client = LiteralClient( api_key=) literal_client.instrument_openai() query = "What's 2+2?" messages = [{"role": "user", "content": query}] res = openai_client.chat.completions.create( messages=messages, model="gpt-4", extra_query={ "user-category": "2" }, #extra_body #extra_headers ) print(res) ``` This is important for ppl only using the instrumentation. How do they pass in the user, metadata or tags? Is this possible? Is this also an advantage for having an AI proxy? DoD: * Recommendation on how to tackle this use case.
Following the new directives,
literal_tags
should be renamedliteralai_tags
This change is