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
| Download as zip | |
| Create empty auths folder in directory | |
| Create empty logs folder in directory | |
| Within directory | |
| docker-compose up -d | |
| OpenAI: docker exec -it cli-proxy-api ./CLIProxyAPI --codex-login | |
| Google: docker exec -it cli-proxy-api ./CLIProxyAPI --login |
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 fastapi import FastAPI, HTTPException | |
| from pydantic import BaseModel | |
| from typing import List, Optional | |
| from vllm import LLM, SamplingParams | |
| from vllm.inputs.data import TokensPrompt | |
| from transformers import AutoTokenizer | |
| import math | |
| class RerankRequest(BaseModel): | |
| query: str |
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
| public static Map<String, Set<String>> idsAndFields(final Collection<Match> matches) { | |
| return matches.stream() | |
| .collect(Collectors.groupingBy( | |
| match -> match.id, | |
| Collectors.flatMapping( | |
| match -> match.positions().stream() | |
| .map(position -> position.fieldName), | |
| Collectors.toSet() | |
| ) | |
| )); |
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
| # 2 [ 1] | |
| # 3 [ 3, 1] | |
| # 5 [5, 3, 1, 3, 1, 3, 5, 1] | |
| # (19) 7 [9, 1, 3, 1, 3, 5, 1, 5, 3, 1, 3, 5, 5, 1, 5, 3, 1, 5, 3, 5, 7, 3, 1, 3, 1, 3********************************************************************, 7, 5, 3, 5, 1, 3, 5, 1, 5, 5, 3, 1, 3, 5, 1, 5, 3, 1, 3, 1, 9, 1] | |
| # ( 9) 11 [11, 3, 1, 3, 5, 1, 5, 3, 1, 3, 5, 5, 1, 5, 3, 1, 5, 3, 5, 7, 3, 1, 3, 1, 3, 13, 3, 5, 1, 9, 1, 5, 5, 3********************************************************************, 1, 3, 5, 1, 9, 1, 3, 1, 11, 9, 1, 3, 1, 3, 5, 1, 5, 3, 5, 5, 5, 1, 5, 3, 1, 5, 3, 5, 7, 3, 1, 3, 5, 7, 5, 9, 1, 3, 5, 1, 5, 5, 3, 1, 3, 5, 1, 5, 3, 1, 5, 9, 1, 9, 1, 3, 1, 3, 5, 7, 3, 1, 3, 11, 1, 5, 3, 1, 5, 3, 5, 11, 1, 3, 1, 3, 7, 5, 3, 5, 1, 3, 5, 1, 5, 9, 1, 3,5, 1, 5, 3, 1, 3, 1, 9, 1, 9, 1, 3, 5, 5, 1, 5, 5, 3, 5, 5, 1, 5, 3, 1, 5, 3, 5, 7, 3, 1, 5,3, 7, 5, 3, 5, 1, 3, 5, 7, 5, 3, 1, 9, 1, 5, 3, 1, 3, 1, 9, 1, 9, 1, 3, 1, 3, 7, 5, 3, 1, 3,5, 5, 1, 5, 3, 7, 3, 5, 7, 3, 1, 3, 1, 3, 7, 5, 3, 5, 5, 5, 1, 5, 5, 3, 1, 3, 5, 1, 5 |
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
| class ClassTest { | |
| public static class A_MODEL { | |
| public B_MODEL b; | |
| public C_MODEL c; | |
| } | |
| public static class A_DTO { | |
| public B_DTO b; | |
| } |
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
| export function once(func) { | |
| let invoked = false; | |
| return function() { | |
| if (invoked) { | |
| return; | |
| } | |
| invoked = true; | |