Closed jmizgajski closed 9 months ago
following code yields a 404 on openai==1.3.5 which destroys compatibility with langchain and llama_index
404
openai==1.3.5
langchain
llama_index
client = OpenAI( default_headers={ "HTTP-Referer": referer, }, base_url="https://openrouter.ai/api/v1", api_key=open_router_key, max_retries = max_retries, ) response = client.completions.create( prompt=prompt, model=self.model_name, max_tokens=self.max_tokens, temperature=self.temperature, n=self.n, ) reply = response.choices[0].text
the request made looks like this in debugger - seems open-ai changed their endpoints
Re:discord conversation, the python example is at: https://github.com/OpenRouterTeam/openrouter-examples-python/tree/main
following code yields a
404
onopenai==1.3.5
which destroys compatibility withlangchain
andllama_index
the request made looks like this in debugger - seems open-ai changed their endpoints